mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
90f7976880
commit
640e95abdf
4 changed files with 10 additions and 4 deletions
|
|
@ -1770,10 +1770,13 @@ at32_add_device_usba(unsigned int id, struct usba_platform_data *data)
|
|||
ARRAY_SIZE(usba0_resource)))
|
||||
goto out_free_pdev;
|
||||
|
||||
if (data)
|
||||
if (data) {
|
||||
usba_data.pdata.vbus_pin = data->vbus_pin;
|
||||
else
|
||||
usba_data.pdata.vbus_pin_inverted = data->vbus_pin_inverted;
|
||||
} else {
|
||||
usba_data.pdata.vbus_pin = -EINVAL;
|
||||
usba_data.pdata.vbus_pin_inverted = -EINVAL;
|
||||
}
|
||||
|
||||
data = &usba_data.pdata;
|
||||
data->num_ep = ARRAY_SIZE(at32_usba_ep);
|
||||
|
|
|
|||
Loading…
Reference in a new issue