aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/bits.h
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2012-05-11 10:25:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-11 19:52:10 -0400
commit5f36e231e9dbffb5264612e5b5817ab574a5e5db (patch)
treea71027cded532334d3d51cbf737925240d34e7df /drivers/usb/chipidea/bits.h
parente443b333629f82ca0da91a05ca638050943bbedd (diff)
usb: chipidea: add support for roles
Add some generic code for roles and implement simple role switching based on ID pin state and/or a sysfs file. At this, we also rename the device to ci_hdrc, which is what it is. The "manual" switch is made into a sysfs file and not debugfs, because it might be useful even in non-debug context. For some boards, like sheevaplug, it seems to be the only way to switch roles without modifying the hardware, since the ID pin is always grounded. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/bits.h')
-rw-r--r--drivers/usb/chipidea/bits.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/bits.h b/drivers/usb/chipidea/bits.h
index 5fbff11cf220..62c35af1a5af 100644
--- a/drivers/usb/chipidea/bits.h
+++ b/drivers/usb/chipidea/bits.h
@@ -50,6 +50,24 @@
50#define DEVLC_PSPD (0x03UL << 25) 50#define DEVLC_PSPD (0x03UL << 25)
51#define DEVLC_PSPD_HS (0x02UL << 25) 51#define DEVLC_PSPD_HS (0x02UL << 25)
52 52
53/* OTGSC */
54#define OTGSC_IDPU BIT(5)
55#define OTGSC_ID BIT(8)
56#define OTGSC_AVV BIT(9)
57#define OTGSC_ASV BIT(10)
58#define OTGSC_BSV BIT(11)
59#define OTGSC_BSE BIT(12)
60#define OTGSC_IDIS BIT(16)
61#define OTGSC_AVVIS BIT(17)
62#define OTGSC_ASVIS BIT(18)
63#define OTGSC_BSVIS BIT(19)
64#define OTGSC_BSEIS BIT(20)
65#define OTGSC_IDIE BIT(24)
66#define OTGSC_AVVIE BIT(25)
67#define OTGSC_ASVIE BIT(26)
68#define OTGSC_BSVIE BIT(27)
69#define OTGSC_BSEIE BIT(28)
70
53/* USBMODE */ 71/* USBMODE */
54#define USBMODE_CM (0x03UL << 0) 72#define USBMODE_CM (0x03UL << 0)
55#define USBMODE_CM_IDLE (0x00UL << 0) 73#define USBMODE_CM_IDLE (0x00UL << 0)