summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@egauge.net>2014-05-29 10:23:55 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-29 11:19:30 -0700
commit4055e5e54ecea4a41edec42f6bd4ee274892e872 (patch)
tree2120dec626ae5440b5def392fcfdda06821bbfdc /drivers/usb/host
parent05dfa5c9bc37933181b619e42ec0eeb41ef31362 (diff)
downloadop-kernel-dev-4055e5e54ecea4a41edec42f6bd4ee274892e872.zip
op-kernel-dev-4055e5e54ecea4a41edec42f6bd4ee274892e872.tar.gz
usb: host: max3421-hcd: Allow platform-data to specify Vbus polarity
Signed-off-by: Davidm Mosberger <davidm@egauge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/max3421-hcd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c
index ccb1bc4..fd3ed99 100644
--- a/drivers/usb/host/max3421-hcd.c
+++ b/drivers/usb/host/max3421-hcd.c
@@ -1717,7 +1717,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);
@@ -1766,7 +1767,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);
OpenPOWER on IntegriCloud