summaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2017-05-05 14:12:24 +0800
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-05-17 14:15:28 +0300
commit7d21114dc6a2d53babef43a84a8d8db2905d283d (patch)
treeef0fafad5f3db96621d415b46bf5315fe1ddd8b2 /include/linux/usb
parent05853ad68e66ab3dc7ed510005203672d7db292f (diff)
downloadlinux-stable-7d21114dc6a2d53babef43a84a8d8db2905d283d.tar.gz
linux-stable-7d21114dc6a2d53babef43a84a8d8db2905d283d.tar.bz2
linux-stable-7d21114dc6a2d53babef43a84a8d8db2905d283d.zip
usb: phy: Introduce one extcon device into usb phy
Usually usb phy need register one extcon device to get the connection notifications. It will remove some duplicate code if the extcon device is registered using common code instead of each phy driver having its own related extcon APIs. So we add one pointer of extcon device into usb phy structure, and some other helper functions to register extcon. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/phy.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 31a8068c42a5..299245105610 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -9,6 +9,7 @@
#ifndef __LINUX_USB_PHY_H
#define __LINUX_USB_PHY_H
+#include <linux/extcon.h>
#include <linux/notifier.h>
#include <linux/usb.h>
@@ -85,6 +86,12 @@ struct usb_phy {
struct usb_phy_io_ops *io_ops;
void __iomem *io_priv;
+ /* to support extcon device */
+ struct extcon_dev *edev;
+ struct extcon_dev *id_edev;
+ struct notifier_block vbus_nb;
+ struct notifier_block id_nb;
+
/* for notification of usb_phy_events */
struct atomic_notifier_head notifier;