1
0
Fork 0
Commit Graph

3 Commits (redonkable)

Author SHA1 Message Date
Krzysztof Kozlowski a908e29705 extcon: ptn5150: Fix usage of atomic GPIO with sleeping GPIO chips
commit 6aaad58c87 upstream.

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: 4ed754de2d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-05 11:43:24 +01:00
Wei Yongjun 3dfed89512 extcon: ptn5150: Fix return value check in ptn5150_i2c_probe()
In case of error, the function devm_gpiod_get() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2019-02-11 17:21:38 +09:00
Vijai Kumar K 4ed754de2d extcon: Add support for ptn5150 extcon driver
PTN5150 is a small thin low power CC (Configurationn Channel)
Logic chip supporting the USB Type-C connector application with
CC control logic detection and indication functions.

Signed-off-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com>
[cw00.choi: Fix bulid dependency and clean-up code]
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
2019-02-11 17:21:38 +09:00