extcon: usb-gpio: Add VBUS detection support
authorRoger Quadros <rogerq@ti.com>
Tue, 20 Sep 2016 14:53:55 +0000 (17:53 +0300)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:28:11 +0000 (15:28 -0500)
commit85e86e28c39c09f62789af4a89e93c446cb8ec72
treebc65ef47371124238c2bba71cc55d0a908707f69
parent9eaabf9fbb41aacb37eb7cff9ec95e3017391932
extcon: usb-gpio: Add VBUS detection support

Driver can now work with both ID and VBUS pins or either one of
them.

There can be the following 3 cases

1) Both ID and VBUS GPIOs are available:

ID = LOW -> USB_HOST active, USB inactive
ID = HIGH -> USB_HOST inactive, USB state is same as VBUS.

2) Only ID GPIO is available:

ID = LOW -> USB_HOST active, USB inactive
ID = HIGH -> USB_HOST inactive, USB active

3) Only VBUS GPIO is available:

VBUS = LOW -> USB_HOST inactive, USB inactive
VBUS = HIGH -> USB_HOST inactive, USB active

Signed-off-by: Roger Quadros <rogerq@ti.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
(cherry picked from commit 541332a13b1ded42097ba96c52c7bc70931e528c)
Documentation/devicetree/bindings/extcon/extcon-usb-gpio.txt
drivers/extcon/extcon-usb-gpio.c