diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2015-01-14 17:22:02 +0100 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2015-01-15 14:52:07 +0100 |
commit | f0bceab4e3b528e799aba8fda8d2936fcfd41f1f (patch) | |
tree | 7093239025b63922fa6efff9f10834c9fcb8912d /drivers/usb/gadget/udc/at91_udc.h | |
parent | usb: gadget: at91_udc: Simplify probe and remove functions (diff) | |
download | linux-f0bceab4e3b528e799aba8fda8d2936fcfd41f1f.tar.xz linux-f0bceab4e3b528e799aba8fda8d2936fcfd41f1f.zip |
usb: gadget: at91_udc: Rework for multi-platform kernel support
cpu_is_at91xxx are a set of macros defined in mach/cpu.h and are here used
to detect the SoC we are booting on.
Use compatible string + a caps structure to replace those cpu_is_xxx tests.
Remove all mach and asm headers (which are now unused).
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'drivers/usb/gadget/udc/at91_udc.h')
-rw-r--r-- | drivers/usb/gadget/udc/at91_udc.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/at91_udc.h b/drivers/usb/gadget/udc/at91_udc.h index e647d1c2ada4..4fc0daa6587f 100644 --- a/drivers/usb/gadget/udc/at91_udc.h +++ b/drivers/usb/gadget/udc/at91_udc.h @@ -107,6 +107,11 @@ struct at91_ep { unsigned fifo_bank:1; }; +struct at91_udc_caps { + int (*init)(struct at91_udc *udc); + void (*pullup)(struct at91_udc *udc, int is_on); +}; + /* * driver is non-SMP, and just blocks IRQs whenever it needs * access protection for chip registers or driver state @@ -115,6 +120,7 @@ struct at91_udc { struct usb_gadget gadget; struct at91_ep ep[NUM_ENDPOINTS]; struct usb_gadget_driver *driver; + const struct at91_udc_caps *caps; unsigned vbus:1; unsigned enabled:1; unsigned clocked:1; @@ -134,6 +140,7 @@ struct at91_udc { spinlock_t lock; struct timer_list vbus_timer; struct work_struct vbus_timer_work; + struct regmap *matrix; }; static inline struct at91_udc *to_udc(struct usb_gadget *g) |