blob: 4e58b6a9d945184fd51a5289023dea9cafd4168c [file] [log] [blame]
From aa9b01347908dff34d0537c1f10c3840b26a27a3 Mon Sep 17 00:00:00 2001
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Wed, 13 Dec 2017 15:46:58 +0900
Subject: [PATCH 0511/1795] usb: renesas_usbhs: add a new callback for extcon
notifier
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>
(cherry picked from commit f16323fdbd40a4062fb6c89d563e26d93854caa0)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
include/linux/usb/renesas_usbhs.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
index 67102f3d59d4..9482735d4ca5 100644
--- a/include/linux/usb/renesas_usbhs.h
+++ b/include/linux/usb/renesas_usbhs.h
@@ -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);
};
/*
--
2.19.0