extcon: gpio-states: Add support for provide cable state without gpios
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 5 Feb 2016 13:02:43 +0000 (18:02 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Fri, 19 Feb 2016 02:06:59 +0000 (18:06 -0800)
commite0068f697643530d4b9891f5835f389f3381911d
tree7da562a2da3b858989171f8b4d638cb618b60222
parent56dbd9ab54eb756ef3175ebba9e160475ae782a6
extcon: gpio-states: Add support for provide cable state without gpios

Add support to provide cable connection states via extcon
framework even if there is no gpios property is provided.

On this case, it will read the initial cable state property
from DT and set the cable state. The cable state can be change
by extcon sysfs.

This helps in case where dynamic detection of cable is not
available and user still want to use multiple type of
cable on port. On this case, user can connect cable and
then cable state via sysfs.

bug 1671524

Change-Id: I79a2ca117d07c432440ed2f328a8a61919e22218
Reviewed-on: http://git-master/r/1008915
(cherry picked from commit 7b192eb4849cf1303b446188e91994ccc900c6c5)
Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com>
Reviewed-on: http://git-master/r/1011844
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Documentation/devicetree/bindings/extcon/extcon-gpio-states.txt
drivers/extcon/extcon-gpio-states.c