diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2022-09-01 10:16:49 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-09-07 16:23:54 +0200 |
commit | 787f51f210ebe5d7d5e4c8101b148f0018e9c409 (patch) | |
tree | 74e67c42626a5d7c199c4127720d42e627b48f48 /arch/arm/mach-s3c/mach-n30.c | |
parent | usb: misc: uss720: fix uninitialized variable rlen (diff) | |
download | linux-dev-787f51f210ebe5d7d5e4c8101b148f0018e9c409.tar.xz linux-dev-787f51f210ebe5d7d5e4c8101b148f0018e9c409.zip |
USB/ARM: Switch S3C2410 UDC to GPIO descriptors
This converts the S3C2410 UDC USB device controller to use
GPIO descriptor tables and modern GPIO.
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Alim Akhtar <alim.akhtar@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-samsung-soc@vger.kernel.org
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20220901081649.564348-1-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mach-s3c/mach-n30.c')
-rw-r--r-- | arch/arm/mach-s3c/mach-n30.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/arm/mach-s3c/mach-n30.c b/arch/arm/mach-s3c/mach-n30.c index 75f5dc6351a1..90122fc6b2aa 100644 --- a/arch/arm/mach-s3c/mach-n30.c +++ b/arch/arm/mach-s3c/mach-n30.c @@ -84,9 +84,15 @@ static struct s3c2410_uartcfg n30_uartcfgs[] = { }; static struct s3c2410_udc_mach_info n30_udc_cfg __initdata = { - .vbus_pin = S3C2410_GPG(1), - .vbus_pin_inverted = 0, - .pullup_pin = S3C2410_GPB(3), +}; + +static struct gpiod_lookup_table n30_udc_gpio_table = { + .dev_id = "s3c2410-usbgadget", + .table = { + GPIO_LOOKUP("GPIOG", 1, "vbus", GPIO_ACTIVE_HIGH), + GPIO_LOOKUP("GPIOB", 3, "pullup", GPIO_ACTIVE_HIGH), + { }, + }, }; static struct gpio_keys_button n30_buttons[] = { @@ -595,6 +601,7 @@ static void __init n30_init(void) WARN_ON(gpio_request(S3C2410_GPG(4), "mmc power")); s3c24xx_fb_set_platdata(&n30_fb_info); + gpiod_add_lookup_table(&n30_udc_gpio_table); s3c24xx_udc_set_platdata(&n30_udc_cfg); gpiod_add_lookup_table(&n30_mci_gpio_table); s3c24xx_mci_set_platdata(&n30_mci_cfg); |