Skip to content

Commit

Permalink
ARM: davinci: da830-evm: use gpio lookup entries for usb gpios
Browse files Browse the repository at this point in the history
Add lookup entries for vbus and overcurrent gpios for da830-evm.

Signed-off-by: Bartosz Golaszewski <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Signed-off-by: Sekhar Nori <[email protected]>
  • Loading branch information
brgl authored and nsekhar committed Feb 12, 2019
1 parent c08df69 commit 1703cf5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions arch/arm/mach-davinci/board-da830-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1703cf5

Please sign in to comment.