mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
gpio: sim: mark the GPIO chip as a one that can sleep
commit5a78d5db9cupstream. Simulated chips use a mutex for synchronization in driver callbacks so they must not be called from interrupt context. Set the can_sleep field of the GPIO chip to true to force users to only use threaded irqs. Fixes:cb8c474e79("gpio: sim: new testing module") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
227bd2c1ea
commit
b8cd871d0a
@@ -425,6 +425,7 @@ static int gpio_sim_add_bank(struct fwnode_handle *swnode, struct device *dev)
|
|||||||
gc->set_config = gpio_sim_set_config;
|
gc->set_config = gpio_sim_set_config;
|
||||||
gc->to_irq = gpio_sim_to_irq;
|
gc->to_irq = gpio_sim_to_irq;
|
||||||
gc->free = gpio_sim_free;
|
gc->free = gpio_sim_free;
|
||||||
|
gc->can_sleep = true;
|
||||||
|
|
||||||
ret = devm_gpiochip_add_data(dev, gc, chip);
|
ret = devm_gpiochip_add_data(dev, gc, chip);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|||||||
Reference in New Issue
Block a user