[PATCH V1 1/3] usb: misc: Add the interface for notifier call for Embedded USB Debugger(EUD)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux