From: Cliff Cai <cliff.cai@xxxxxxxxxx> Rather than hardcoding the gpio levels for vrsel, allow the platform resources to handle this so boards can be active high or low. Signed-off-by: Cliff Cai <cliff.cai@xxxxxxxxxx> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx> --- drivers/usb/musb/blackfin.c | 4 ++-- include/linux/usb/musb.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index ad26e65..e4c2931 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c @@ -248,9 +248,9 @@ static void bfin_vbus_power(struct musb *musb, int is_on, int sleeping) static void bfin_set_vbus(struct musb *musb, int is_on) { if (is_on) - gpio_set_value(musb->config->gpio_vrsel, 1); + gpio_set_value(musb->config->gpio_vrsel, musb->config->gpio_vrsel_active); else - gpio_set_value(musb->config->gpio_vrsel, 0); + gpio_set_value(musb->config->gpio_vrsel, !musb->config->gpio_vrsel_active); DBG(1, "VBUS %s, devctl %02x " /* otg %3x conf %08x prcm %08x */ "\n", diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index d437556..cd2be44 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h @@ -53,6 +53,7 @@ struct musb_hdrc_config { #ifdef CONFIG_BLACKFIN /* A GPIO controlling VRSEL in Blackfin */ unsigned int gpio_vrsel; + unsigned int gpio_vrsel_active; #endif }; -- 1.6.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html