]> git.baikalelectronics.ru Git - kernel.git/commit
extcon: ptn5150: Check current USB mode when probing
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 17 Aug 2020 07:00:04 +0000 (09:00 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 24 Sep 2020 10:20:48 +0000 (19:20 +0900)
commit2caa72a83ae50028988311826f6cab960f719670
treeab5bb348ba7ce78f46e00754feff0bf80bff2a0d
parentc7cd3fd2e2260527e55cbd7631205ce392a46df1
extcon: ptn5150: Check current USB mode when probing

When machine boots up, the USB could be already in OTG mode.  In such
case there will be no interrupt coming to ptn5150 device and driver will
report default state of nothing connected.  Detection of USB connection
would happen on first unplug of the cable.

Factor out code for checking current connection mode and call it right
after probe so the existing USB mode will be properly reported.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-ptn5150.c