]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
authorWenhua Lin <Wenhua.Lin@unisoc.com>
Thu, 21 Sep 2023 12:25:27 +0000 (20:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Oct 2023 12:56:50 +0000 (14:56 +0200)
commit0d6c2f0942c3e0bd826c24dc17d1c544f4ec82de
tree765d530c3ad0b416e3d6b52e54e5d28096c14bfa
parente578a26084eba5758972ede124169510f778cf45
gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip

[ Upstream commit 26d9e5640d2130ee16df7b1fb6a908f460ab004c ]

The drivers uses a mutex and I2C bus access in its PMIC EIC chip
get implementation. This means these functions can sleep and the PMIC EIC
chip should set the can_sleep property to true.

This will ensure that a warning is printed when trying to get the
value from a context that potentially can't sleep.

Fixes: 348f3cde84ab ("gpio: Add Spreadtrum PMIC EIC driver support")
Signed-off-by: Wenhua Lin <Wenhua.Lin@unisoc.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-pmic-eic-sprd.c