diff options
author | Wenhua Lin <Wenhua.Lin@unisoc.com> | 2023-09-21 15:25:27 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-09-27 10:12:09 +0300 |
commit | 26d9e5640d2130ee16df7b1fb6a908f460ab004c (patch) | |
tree | a3c439822aa08b65b78600f438a2fe1e6e1db61e /drivers/gpio/gpio-pmic-eic-sprd.c | |
parent | 9e8bc2dda5a7a8e2babc9975f4b11c9a6196e490 (diff) | |
download | linux-26d9e5640d2130ee16df7b1fb6a908f460ab004c.tar.xz |
gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
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>
Diffstat (limited to 'drivers/gpio/gpio-pmic-eic-sprd.c')
-rw-r--r-- | drivers/gpio/gpio-pmic-eic-sprd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-pmic-eic-sprd.c b/drivers/gpio/gpio-pmic-eic-sprd.c index 2b9b7be9b8fd..01c0fd0a9d8c 100644 --- a/drivers/gpio/gpio-pmic-eic-sprd.c +++ b/drivers/gpio/gpio-pmic-eic-sprd.c @@ -352,6 +352,7 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev) pmic_eic->chip.set_config = sprd_pmic_eic_set_config; pmic_eic->chip.set = sprd_pmic_eic_set; pmic_eic->chip.get = sprd_pmic_eic_get; + pmic_eic->chip.can_sleep = true; irq = &pmic_eic->chip.irq; gpio_irq_chip_set_chip(irq, &pmic_eic_irq_chip); |