diff options
author | Alexander Shishkin <alexander.shishkin@linux.intel.com> | 2012-05-11 10:25:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-11 19:52:10 -0400 |
commit | 5f36e231e9dbffb5264612e5b5817ab574a5e5db (patch) | |
tree | a71027cded532334d3d51cbf737925240d34e7df /drivers/usb/chipidea/udc.h | |
parent | e443b333629f82ca0da91a05ca638050943bbedd (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/udc.h')
-rw-r--r-- | drivers/usb/chipidea/udc.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/usb/chipidea/udc.h b/drivers/usb/chipidea/udc.h index 82c9e3e772f7..3a9e6694f327 100644 --- a/drivers/usb/chipidea/udc.h +++ b/drivers/usb/chipidea/udc.h | |||
@@ -71,26 +71,16 @@ struct ci13xxx_req { | |||
71 | }; | 71 | }; |
72 | 72 | ||
73 | #ifdef CONFIG_USB_CHIPIDEA_UDC | 73 | #ifdef CONFIG_USB_CHIPIDEA_UDC |
74 | irqreturn_t udc_irq(int irq, void *data); | 74 | |
75 | int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, | 75 | int ci_hdrc_gadget_init(struct ci13xxx *ci); |
76 | void __iomem *regs, struct ci13xxx **_udc); | 76 | |
77 | void udc_remove(struct ci13xxx *udc); | ||
78 | #else | 77 | #else |
79 | static inline irqreturn_t udc_irq(int irq, void *data) | ||
80 | { | ||
81 | return IRQ_NONE; | ||
82 | } | ||
83 | 78 | ||
84 | static inline | 79 | static inline int ci_hdrc_gadget_init(struct ci13xxx *ci) |
85 | int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, | ||
86 | void __iomem *regs, struct ci13xxx **_udc) | ||
87 | { | 80 | { |
88 | return -ENODEV; | 81 | return -ENXIO; |
89 | } | 82 | } |
90 | 83 | ||
91 | static inline void udc_remove(struct ci13xxx *udc) | ||
92 | { | ||
93 | } | ||
94 | #endif | 84 | #endif |
95 | 85 | ||
96 | #endif /* __DRIVERS_USB_CHIPIDEA_UDC_H */ | 86 | #endif /* __DRIVERS_USB_CHIPIDEA_UDC_H */ |