[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1429008120-5395-12-git-send-email-rogerq@ti.com>
Date: Tue, 14 Apr 2015 13:41:58 +0300
From: Roger Quadros <rogerq@...com>
To: <gregkh@...uxfoundation.org>, <balbi@...com>,
<stern@...land.harvard.edu>
CC: <dan.j.williams@...el.com>, <peter.chen@...escale.com>,
<jun.li@...escale.com>, <mathias.nyman@...ux.intel.com>,
<tony@...mide.com>, <linux-usb@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>,
Roger Quadros <rogerq@...com>
Subject: [RFC][PATCH v2 11/13] usb: add "dual-role" mode to dr_mode device tree helper
We need to differentiat between "otg" and "dual-role" operation.
dual-role means capability to operate as host or device depending
on the ID pin status but no support for any of the OTG features
like SRP, HNP and on the fly role-swap.
The only way to change the role for a dual-role device is to
toggle the ID pin by changing the cable.
Signed-off-by: Roger Quadros <rogerq@...com>
---
Documentation/devicetree/bindings/usb/generic.txt | 2 +-
drivers/usb/common/common.c | 1 +
include/linux/usb/otg.h | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/usb/generic.txt b/Documentation/devicetree/bindings/usb/generic.txt
index 477d5bb..64438f9 100644
--- a/Documentation/devicetree/bindings/usb/generic.txt
+++ b/Documentation/devicetree/bindings/usb/generic.txt
@@ -8,7 +8,7 @@ Optional properties:
HW capability.
- dr_mode: tells Dual-Role USB controllers that we want to work on a
particular mode. Valid arguments are "host",
- "peripheral" and "otg". In case this attribute isn't
+ "peripheral", "otg", "dual-role". In case this attribute isn't
passed via DT, USB DRD controllers should default to
OTG.
diff --git a/drivers/usb/common/common.c b/drivers/usb/common/common.c
index b530fd4..faf51fe 100644
--- a/drivers/usb/common/common.c
+++ b/drivers/usb/common/common.c
@@ -87,6 +87,7 @@ static const char *const usb_dr_modes[] = {
[USB_DR_MODE_HOST] = "host",
[USB_DR_MODE_PERIPHERAL] = "peripheral",
[USB_DR_MODE_OTG] = "otg",
+ [USB_DR_MODE_DRD] = "dual-role",
};
/**
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 52661c5..d6057fb 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -102,6 +102,7 @@ enum usb_dr_mode {
USB_DR_MODE_HOST,
USB_DR_MODE_PERIPHERAL,
USB_DR_MODE_OTG,
+ USB_DR_MODE_DRD,
};
#endif /* __LINUX_USB_OTG_H */
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists