aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-02-11 05:36:57 -0500
committerSekhar Nori <nsekhar@ti.com>2019-02-12 02:58:41 -0500
commitc08df69149db9bbd0b21802f93b65e8d32d44069 (patch)
tree4f4644563d8625944770583d591155315908712e
parent3d2ab9f35ebda97de7392716022a4ed8ab646861 (diff)
ARM: davinci: omapl138-hawk: use gpio lookup entries for usb gpios
Add lookup entries for the vbus and overcurrent gpios for omapl138-hawk. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--arch/arm/mach-davinci/board-omapl138-hawk.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index 8e8d51f4a276..dc7e363d3fa2 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -302,6 +302,14 @@ static const short da850_hawk_usb11_pins[] = {
302 -1 302 -1
303}; 303};
304 304
305static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
306 .dev_id = "ohci-da8xx",
307 .table = {
308 GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0),
309 GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0),
310 },
311};
312
305static int hawk_usb_set_power(unsigned port, int on) 313static int hawk_usb_set_power(unsigned port, int on)
306{ 314{
307 gpio_set_value(DA850_USB1_VBUS_PIN, on); 315 gpio_set_value(DA850_USB1_VBUS_PIN, on);
@@ -390,6 +398,8 @@ static __init void omapl138_hawk_usb_init(void)
390 goto usb11_setup_oc_fail; 398 goto usb11_setup_oc_fail;
391 } 399 }
392 400
401 gpiod_add_lookup_table(&hawk_usb_gpio_lookup);
402
393 ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata); 403 ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
394 if (ret) { 404 if (ret) {
395 pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret); 405 pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);