Skip to content

Commit 26d9e56

Browse files
Wenhua LinBartosz Golaszewski
authored andcommitted
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: 348f3cd ("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>
1 parent 9e8bc2d commit 26d9e56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpio/gpio-pmic-eic-sprd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ static int sprd_pmic_eic_probe(struct platform_device *pdev)
352352
pmic_eic->chip.set_config = sprd_pmic_eic_set_config;
353353
pmic_eic->chip.set = sprd_pmic_eic_set;
354354
pmic_eic->chip.get = sprd_pmic_eic_get;
355+
pmic_eic->chip.can_sleep = true;
355356

356357
irq = &pmic_eic->chip.irq;
357358
gpio_irq_chip_set_chip(irq, &pmic_eic_irq_chip);

0 commit comments

Comments
 (0)