aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpio/gpiolib.c2
-rw-r--r--include/linux/gpio/driver.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 4acf8b2e9226..6fdae789ccc9 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -437,7 +437,7 @@ static int gpiochip_irq_map(struct irq_domain *d, unsigned int irq,
437 irq_set_lockdep_class(irq, &gpiochip_irq_lock_class); 437 irq_set_lockdep_class(irq, &gpiochip_irq_lock_class);
438 irq_set_chip_and_handler(irq, chip->irqchip, chip->irq_handler); 438 irq_set_chip_and_handler(irq, chip->irqchip, chip->irq_handler);
439 /* Chips that can sleep need nested thread handlers */ 439 /* Chips that can sleep need nested thread handlers */
440 if (chip->can_sleep) 440 if (chip->can_sleep && !chip->irq_not_threaded)
441 irq_set_nested_thread(irq, 1); 441 irq_set_nested_thread(irq, 1);
442#ifdef CONFIG_ARM 442#ifdef CONFIG_ARM
443 set_irq_flags(irq, IRQF_VALID); 443 set_irq_flags(irq, IRQF_VALID);
diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h
index 560bf7fa614f..719fab209158 100644
--- a/include/linux/gpio/driver.h
+++ b/include/linux/gpio/driver.h
@@ -56,6 +56,8 @@ struct seq_file;
56 * as the chip access may sleep when e.g. reading out the IRQ status 56 * as the chip access may sleep when e.g. reading out the IRQ status
57 * registers. 57 * registers.
58 * @exported: flags if the gpiochip is exported for use from sysfs. Private. 58 * @exported: flags if the gpiochip is exported for use from sysfs. Private.
59 * @irq_not_threaded: flag must be set if @can_sleep is set but the
60 * IRQs don't need to be threaded
59 * 61 *
60 * A gpio_chip can help platforms abstract various sources of GPIOs so 62 * A gpio_chip can help platforms abstract various sources of GPIOs so
61 * they can all be accessed through a common programing interface. 63 * they can all be accessed through a common programing interface.
@@ -101,6 +103,7 @@ struct gpio_chip {
101 struct gpio_desc *desc; 103 struct gpio_desc *desc;
102 const char *const *names; 104 const char *const *names;
103 bool can_sleep; 105 bool can_sleep;
106 bool irq_not_threaded;
104 bool exported; 107 bool exported;
105 108
106#ifdef CONFIG_GPIOLIB_IRQCHIP 109#ifdef CONFIG_GPIOLIB_IRQCHIP