* [v2,4/8] ARM: davinci: da830-evm: use gpio lookup entries for usb gpios
@ 2019-02-11 10:36 Bartosz Golaszewski
0 siblings, 0 replies; only message in thread
From: Bartosz Golaszewski @ 2019-02-11 10:36 UTC (permalink / raw)
To: Sekhar Nori, Kevin Hilman, Alan Stern, Greg Kroah-Hartman
Cc: linux-arm-kernel, linux-kernel, linux-usb, Linus Walleij,
Bartosz Golaszewski
From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Add lookup entries for vbus and overcurrent gpios for da830-evm.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
arch/arm/mach-davinci/board-da830-evm.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c
index c4da635ee4ce..0712a37153a8 100644
--- a/arch/arm/mach-davinci/board-da830-evm.c
+++ b/arch/arm/mach-davinci/board-da830-evm.c
@@ -54,6 +54,14 @@ static const short da830_evm_usb11_pins[] = {
static da8xx_ocic_handler_t da830_evm_usb_ocic_handler;
+static struct gpiod_lookup_table da830_evm_usb_gpio_lookup = {
+ .dev_id = "ohci-da8xx",
+ .table = {
+ GPIO_LOOKUP("davinci_gpio", ON_BD_USB_DRV, "vbus", 0),
+ GPIO_LOOKUP("davinci_gpio", ON_BD_USB_OVC, "oc", 0),
+ },
+};
+
static int da830_evm_usb_set_power(unsigned port, int on)
{
gpio_set_value(ON_BD_USB_DRV, on);
@@ -158,6 +166,8 @@ static __init void da830_evm_usb_init(void)
}
gpio_direction_input(ON_BD_USB_OVC);
+ gpiod_add_lookup_table(&da830_evm_usb_gpio_lookup);
+
ret = da8xx_register_usb11(&da830_evm_usb11_pdata);
if (ret)
pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-11 10:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-11 10:36 [v2,4/8] ARM: davinci: da830-evm: use gpio lookup entries for usb gpios Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).