aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/mach-at32ap
diff options
context:
space:
mode:
authorEirik Aanonsen <EAA@wprmedical.com>2010-02-05 03:49:25 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-02 17:54:57 -0500
commit640e95abdfae9fef5949084c92e80c8f2f8b5ec5 (patch)
treef8cb60315b5b362b53777c0e11650e681c9c3b65 /arch/avr32/mach-at32ap
parent90f7976880bbbf9968629500972f8e2f80401217 (diff)
USB: atmel uaba: Adding invert vbus_pin
Adding vbus_pin_inverted so that the usb detect pin can be active high or low depending on HW implementation also replaced the gpio_get_value(udc->vbus_pin); with a call to vbus_is_present(udc); This allows the driver to be loaded and save about 0,15W on the consumption. Signed-off-by: Eirik Aanonsen <eaa@wprmedical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/avr32/mach-at32ap')
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index b13d1879e51b..3a4bc1a18433 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1770,10 +1770,13 @@ at32_add_device_usba(unsigned int id, struct usba_platform_data *data)
1770 ARRAY_SIZE(usba0_resource))) 1770 ARRAY_SIZE(usba0_resource)))
1771 goto out_free_pdev; 1771 goto out_free_pdev;
1772 1772
1773 if (data) 1773 if (data) {
1774 usba_data.pdata.vbus_pin = data->vbus_pin; 1774 usba_data.pdata.vbus_pin = data->vbus_pin;
1775 else 1775 usba_data.pdata.vbus_pin_inverted = data->vbus_pin_inverted;
1776 } else {
1776 usba_data.pdata.vbus_pin = -EINVAL; 1777 usba_data.pdata.vbus_pin = -EINVAL;
1778 usba_data.pdata.vbus_pin_inverted = -EINVAL;
1779 }
1777 1780
1778 data = &usba_data.pdata; 1781 data = &usba_data.pdata;
1779 data->num_ep = ARRAY_SIZE(at32_usba_ep); 1782 data->num_ep = ARRAY_SIZE(at32_usba_ep);