summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/dwc3-omap.h
diff options
context:
space:
mode:
authorKishon Vijay Abraham I <kishon@ti.com>2013-01-25 08:30:49 +0530
committerFelipe Balbi <balbi@ti.com>2013-01-25 09:17:09 +0200
commit7e41bba94617b7e4f77d3531a63fbfacdf6842a6 (patch)
treec22c597e17fa0c4e109bb2787a8051079f6334ee /include/linux/usb/dwc3-omap.h
parent6373218da195e9baade9416727720646b3a622aa (diff)
downloadblackbird-op-linux-7e41bba94617b7e4f77d3531a63fbfacdf6842a6.tar.gz
blackbird-op-linux-7e41bba94617b7e4f77d3531a63fbfacdf6842a6.zip
usb: dwc3: omap: Add an API to write to dwc mailbox
Add an API in the omap glue layer to write to the mailbox register which can be used by comparator driver(twl). To pass the detection of the attached device (signified by VBUS, ID) to the dwc3 core, dwc3 core has to write to the mailbox regiter. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb/dwc3-omap.h')
-rw-r--r--include/linux/usb/dwc3-omap.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/usb/dwc3-omap.h b/include/linux/usb/dwc3-omap.h
new file mode 100644
index 000000000000..51eae14477f7
--- /dev/null
+++ b/include/linux/usb/dwc3-omap.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2013 by Texas Instruments
+ *
+ * The Inventra Controller Driver for Linux is free software; you
+ * can redistribute it and/or modify it under the terms of the GNU
+ * General Public License version 2 as published by the Free Software
+ * Foundation.
+ */
+
+#ifndef __DWC3_OMAP_H__
+#define __DWC3_OMAP_H__
+
+enum omap_dwc3_vbus_id_status {
+ OMAP_DWC3_UNKNOWN = 0,
+ OMAP_DWC3_ID_GROUND,
+ OMAP_DWC3_ID_FLOAT,
+ OMAP_DWC3_VBUS_VALID,
+ OMAP_DWC3_VBUS_OFF,
+};
+
+#if (defined(CONFIG_USB_DWC3) || defined(CONFIG_USB_DWC3_MODULE))
+extern void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status);
+#else
+static inline void dwc3_omap_mailbox(enum omap_dwc3_vbus_id_status status)
+{
+ return;
+}
+#endif
+
+#endif /* __DWC3_OMAP_H__ */
OpenPOWER on IntegriCloud