mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
gpio: Introduce struct gpio_irq_chip.first
Some GPIO chips cannot support sparse IRQ numbering and therefore need to manually allocate their interrupt descriptors statically. For these cases, a driver can pass the first allocated IRQ via the struct gpio_irq_chip's "first" field and thereby cause the IRQ domain to map all IRQs during initialization. Suggested-by: Grygorii Strashko <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Acked-by: Grygorii Strashko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
60ed54cae8
commit
8302cf5852
2 changed files with 10 additions and 1 deletions
|
|
@ -1778,7 +1778,8 @@ static int gpiochip_add_irqchip(struct gpio_chip *gpiochip)
|
|||
ops = &gpiochip_domain_ops;
|
||||
|
||||
gpiochip->irq.domain = irq_domain_add_simple(np, gpiochip->ngpio,
|
||||
0, ops, gpiochip);
|
||||
gpiochip->irq.first,
|
||||
ops, gpiochip);
|
||||
if (!gpiochip->irq.domain)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue