extcon: ptn5150: Fix usage of atomic GPIO with sleeping GPIO chips
authorKrzysztof Kozlowski <krzk@kernel.org>
Mon, 17 Aug 2020 07:00:00 +0000 (09:00 +0200)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 24 Sep 2020 10:20:47 +0000 (19:20 +0900)
commit6aaad58c872db062f7ea2761421ca748bd0931cc
tree5cd05a40f25968d5d0e07b8999a671ad141c9db8
parente6b02afce100e97292c0eb0cd1ccfa71d0453e48
extcon: ptn5150: Fix usage of atomic GPIO with sleeping GPIO chips

The driver uses atomic version of gpiod_set_value() without any real
reason.  It is called in a workqueue under mutex so it could sleep
there.  Changing it to "can_sleep" flavor allows to use the driver with
all GPIO chips.

Fixes: 4ed754de2d66 ("extcon: Add support for ptn5150 extcon driver")
Cc: <stable@vger.kernel.org>
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