earjack: Properly detect initial state if more than one extcon exists 80/292880/4
authorMarek Szyprowski <m.szyprowski@samsung.com>
Tue, 16 May 2023 09:33:42 +0000 (11:33 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 7 Jun 2023 22:23:25 +0000 (22:23 +0000)
commitfc0615bae3ea4617441d83418ba04d2078e0af5c
tree4b8052df33f4c8ed58cee01d8f5bb1a9ca8c17c1
parentef7c8c2fa4c75c90a9d7eaa94800178c5373f826
earjack: Properly detect initial state if more than one extcon exists

Add the same logic as for USB cable in commit c9dee14b ("usb-gadget:
Handle more than one extcon reporting USB cable") to properly detect
initial jack state if it has been reported by more than one extcon
device.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I0ce89c1eae22bf06eb406ffe40080f06cce89198
src/extcon/earjack.c