usb: renesas_usbhs: add a new callback for extcon notifier
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Wed, 13 Dec 2017 06:46:58 +0000 (15:46 +0900)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Wed, 13 Dec 2017 10:50:22 +0000 (12:50 +0200)
To set host/peripheral mode by using extcon notifier, this patch
adds a new callback as "notifier" in renesas_usbhs_platform_callback.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
include/linux/usb/renesas_usbhs.h

index 67102f3d59d473de0ccfd7da4106cdd76bbeaa0f..9482735d4ca5b7b8c119215f71c3eb00089acc9d 100644 (file)
@@ -17,6 +17,7 @@
  */
 #ifndef RENESAS_USB_H
 #define RENESAS_USB_H
+#include <linux/notifier.h>
 #include <linux/platform_device.h>
 #include <linux/usb/ch9.h>
 
@@ -98,6 +99,13 @@ struct renesas_usbhs_platform_callback {
         * VBUS control is needed for Host
         */
        int (*set_vbus)(struct platform_device *pdev, int enable);
+
+       /*
+        * option:
+        * extcon notifier to set host/peripheral mode.
+        */
+       int (*notifier)(struct notifier_block *nb, unsigned long event,
+                       void *data);
 };
 
 /*