summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2014-10-13 09:53:03 +0800
committerNitin Garg <nitin.garg@freescale.com>2015-01-15 21:19:04 -0600
commit264bf79490e35ae0a21a6bcf623ba5af5fd46a3a (patch)
tree5ae5c2bfb0eab8d91c497c9be4a14ced9694b474 /include/linux
parent3294abb26fad09d079204a0359893cd737143925 (diff)
usb: ehci: add ehci_port_power interface
The current EHCI implementation is prepared to toggle the PORT_POWER bit to enable or disable a USB-Port. In some cases this port power can not be just toggled by the PORT_POWER bit, and the gpio-regulator is needed to be toggled too. This patch defines a port power control interface ehci_port_power for ehci core use, it toggles PORT_POWER bit as well as calls platform defined .port_power if it is defined. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Acked-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 11a7e59405148c855e0a9d13588930ccec02c150)
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/usb/hcd.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h
index 179c2d0156ef..ec1fdf7c2dda 100644
--- a/include/linux/usb/hcd.h
+++ b/include/linux/usb/hcd.h
@@ -378,6 +378,9 @@ struct hc_driver {
int (*disable_usb3_lpm_timeout)(struct usb_hcd *,
struct usb_device *, enum usb3_link_state state);
int (*find_raw_port_number)(struct usb_hcd *, int);
+ /* Call for power on/off the port if necessary */
+ int (*port_power)(struct usb_hcd *hcd, int portnum, bool enable);
+
};
static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd)