diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2015-01-06 14:46:58 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-01-12 12:13:29 -0600 |
commit | 3280e67536f8a4d4adf8dcde10cb4c4b577c34f4 (patch) | |
tree | 918e5a23ea761c517adf94e37424b045f39b43a2 /drivers/usb/gadget/udc/atmel_usba_udc.h | |
parent | 6f15e2dc710cc604cc81f0ff596d83c332b5cbe8 (diff) | |
download | op-kernel-dev-3280e67536f8a4d4adf8dcde10cb4c4b577c34f4.zip op-kernel-dev-3280e67536f8a4d4adf8dcde10cb4c4b577c34f4.tar.gz |
usb: atmel_usba_udc: Rework at91sam9rl errata handling
at91sam9rl SoC has an erratum forcing us to toggle the BIAS on USB
suspend/resume events.
This specific handling is only activated when CONFIG_ARCH_AT91SAM9RL is
set and this option is only set when building a non-DT kernel, which is
problematic since non-DT support for at91sam9rl SoC has been removed.
Rework the toggle_bias implementation to attach it to the "at91sam9rl-udc"
compatible string.
Add new compatible strings to avoid executing at91sam9rl erratum handling
on other SoCs.
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc/atmel_usba_udc.h')
-rw-r--r-- | drivers/usb/gadget/udc/atmel_usba_udc.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.h b/drivers/usb/gadget/udc/atmel_usba_udc.h index a70706e..456899e 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.h +++ b/drivers/usb/gadget/udc/atmel_usba_udc.h @@ -304,6 +304,10 @@ struct usba_request { unsigned int mapped:1; }; +struct usba_udc_errata { + void (*toggle_bias)(struct usba_udc *udc, int is_on); +}; + struct usba_udc { /* Protect hw registers from concurrent modifications */ spinlock_t lock; @@ -314,6 +318,7 @@ struct usba_udc { struct usb_gadget gadget; struct usb_gadget_driver *driver; struct platform_device *pdev; + const struct usba_udc_errata *errata; int irq; int vbus_pin; int vbus_pin_inverted; |