summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/musb_core.h
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-04-10 21:55:48 +0200
committerFelipe Balbi <balbi@ti.com>2013-05-28 19:22:24 +0300
commit9ad96e694c3d33465d099d0a2db1aae8cb358d1f (patch)
tree59f8eca1876acfd052926c59a7005b5e2222f3f5 /drivers/usb/musb/musb_core.h
parent2cc65feab2f18dfa4297209829ce228989c7356b (diff)
usb: musb: re-introduce musb->port_mode
Define MUSB_PORT_MODE_{HOST,GADGET,DUAL_ROLE} and store the platform-specified value in struct musb. Note that MUSB_PORT_MODE_HOST has to be set to 1 in order to match existing device tree bindings which are already documented but in fact unusued. For information on the bindings, please refer to Documentation/devicetree/bindings/usb/omap-usb.txt Documentation/devicetree/bindings/usb/am33xx-usb.txt Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_core.h')
-rw-r--r--drivers/usb/musb/musb_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index e633fce787f..7d341c387ea 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -77,6 +77,12 @@ struct musb_ep;
#define is_peripheral_active(m) (!(m)->is_host)
#define is_host_active(m) ((m)->is_host)
+enum {
+ MUSB_PORT_MODE_HOST = 1,
+ MUSB_PORT_MODE_GADGET,
+ MUSB_PORT_MODE_DUAL_ROLE,
+};
+
#ifdef CONFIG_PROC_FS
#include <linux/fs.h>
#define MUSB_CONFIG_PROC_FS
@@ -356,6 +362,7 @@ struct musb {
u8 min_power; /* vbus for periph, in mA/2 */
+ int port_mode; /* MUSB_PORT_MODE_* */
bool is_host;
int a_wait_bcon; /* VBUS timeout in msecs */