]> git.baikalelectronics.ru Git - kernel.git/commit
usb: ohci-at91: use descriptor-based gpio APIs correctly
authorPeter Rosin <peda@axentia.se>
Thu, 22 Dec 2016 07:43:55 +0000 (08:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Jan 2017 18:32:29 +0000 (19:32 +0100)
commit8d5574195eb4dea0850cda2649e60c3c03ca51c0
tree881e2d902e13b5d489cca3b2607541bcf78da0d6
parent0f0fa032f5378732c89a0b94bbcbb1cbb245f54e
usb: ohci-at91: use descriptor-based gpio APIs correctly

The gpiod_get* function family does not want the -gpio suffix.
Use devm_gpiod_get_index_optional instead of devm_gpiod_get_optional.
The descriptor based APIs handle active high/low automatically.
The vbus-gpios are output, request enable while getting the gpio.
Don't try to get any vbus-gpios for ports outside num-ports.

WTF? Big sigh.

Fixes: 91cb6d6def5c ("usb: ohci-at91: Use descriptor-based gpio APIs")
Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c