Commit c08df691 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Sekhar Nori

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: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent 3d2ab9f3
......@@ -302,6 +302,14 @@ static const short da850_hawk_usb11_pins[] = {
-1
};
static struct gpiod_lookup_table hawk_usb_gpio_lookup = {
.dev_id = "ohci-da8xx",
.table = {
GPIO_LOOKUP("davinci_gpio", DA850_USB1_VBUS_PIN, "vbus", 0),
GPIO_LOOKUP("davinci_gpio", DA850_USB1_OC_PIN, "oc", 0),
},
};
static int hawk_usb_set_power(unsigned port, int on)
{
gpio_set_value(DA850_USB1_VBUS_PIN, on);
......@@ -390,6 +398,8 @@ static __init void omapl138_hawk_usb_init(void)
goto usb11_setup_oc_fail;
}
gpiod_add_lookup_table(&hawk_usb_gpio_lookup);
ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
if (ret) {
pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment