[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2b04d69396c9522327f6c0f22637a83161a5fe9.1689148711.git.quic_schowdhu@quicinc.com>
Date: Wed, 12 Jul 2023 13:52:38 +0530
From: Souradeep Chowdhury <quic_schowdhu@...cinc.com>
To: <linux-arm-msm@...r.kernel.org>, <linux-usb@...r.kernel.org>,
Andy Gross <agross@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
"Bjorn Andersson" <andersson@...nel.org>,
<gregkh@...uxfoundation.org>
CC: <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>,
Sibi Sankar <quic_sibis@...cinc.com>,
Rajendra Nayak <quic_rjendra@...cinc.com>,
Souradeep Chowdhury <quic_schowdhu@...cinc.com>
Subject: [PATCH V1 1/3] usb: misc: Add the interface for notifier call for Embedded USB Debugger(EUD)
Add the interface for notifier calls that can be made to check the role
switch status of EUD. An external module can import this file and use the
wrapper functions eud_register_notify to register a notifier to the EUD
notifier chain, eud_unregister_notify to unregister the notifier from the
chain, eud_notifier_call_chain to call the notifier chain to check the
status of role-switch. These interfaces are provided to handle the case
where multiple modules might go for a role-switch on the same port in which
case EUD will be given priority over the rest.
Signed-off-by: Souradeep Chowdhury <quic_schowdhu@...cinc.com>
---
drivers/usb/misc/qcom_eud_notifier.h | 10 ++++++++++
1 file changed, 10 insertions(+)
create mode 100644 drivers/usb/misc/qcom_eud_notifier.h
diff --git a/drivers/usb/misc/qcom_eud_notifier.h b/drivers/usb/misc/qcom_eud_notifier.h
new file mode 100644
index 000000000000..0cae42a5f6bf
--- /dev/null
+++ b/drivers/usb/misc/qcom_eud_notifier.h
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Released under the GPLv2 only.
+ */
+
+#include <linux/notifier.h>
+
+extern int eud_register_notify(struct notifier_block *nb);
+extern void eud_unregister_notify(struct notifier_block *nb);
+extern void eud_notifier_call_chain(unsigned long role_switch_state);
--
2.17.1
Powered by blists - more mailing lists