From: David Mosberger-Tang <davidm@xxxxxxxxxx> Signed-off-by: Davidm Mosberger <davidm@xxxxxxxxxx> --- drivers/usb/host/max3421-hcd.c | 6 ++++-- include/linux/platform_data/max3421-hcd.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index fa5ee8e..83c8355 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c @@ -1714,7 +1714,8 @@ max3421_hub_control(struct usb_hcd *hcd, u16 type_req, u16 value, u16 index, break; case USB_PORT_FEAT_POWER: dev_dbg(hcd->self.controller, "power-off\n"); - max3421_gpout_set_value(hcd, pdata->vbus_gpout, 0); + max3421_gpout_set_value(hcd, pdata->vbus_gpout, + !pdata->vbus_active_level); /* FALLS THROUGH */ default: max3421_hcd->port_status &= ~(1 << value); @@ -1763,7 +1764,8 @@ max3421_hub_control(struct usb_hcd *hcd, u16 type_req, u16 value, u16 index, case USB_PORT_FEAT_POWER: dev_dbg(hcd->self.controller, "power-on\n"); max3421_hcd->port_status |= USB_PORT_STAT_POWER; - max3421_gpout_set_value(hcd, pdata->vbus_gpout, 1); + max3421_gpout_set_value(hcd, pdata->vbus_gpout, + pdata->vbus_active_level); break; case USB_PORT_FEAT_RESET: max3421_reset_port(hcd); diff --git a/include/linux/platform_data/max3421-hcd.h b/include/linux/platform_data/max3421-hcd.h index 4ad4596..0303d19 100644 --- a/include/linux/platform_data/max3421-hcd.h +++ b/include/linux/platform_data/max3421-hcd.h @@ -18,6 +18,7 @@ */ struct max3421_hcd_platform_data { u8 vbus_gpout; /* pin controlling Vbus */ + u8 vbus_active_level; /* level that turns on power */ }; #endif /* MAX3421_HCD_PLAT_H_INCLUDED */ -- 1.9.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