• Home
  • Raw
  • Download

Lines Matching full:irq

63  - method to return the IRQ number associated to a given GPIO line
87 atomic context on realtime kernels (inside hard IRQ handlers and similar
261 The IRQ portions of the GPIO block are implemented using an irq_chip, using
262 the header <linux/irq.h>. So this combined driver is utilizing two sub-
263 systems simultaneously: gpio and irq.
265 It is legal for any IRQ consumer to request an IRQ from any irqchip even if it
266 is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and
270 gpiod_to_irq() is just a convenience function to figure out the IRQ for a
272 the IRQ is used.
294 irq line to a parent interrupt controller one level up. There is no need
315 an SoC. This means that there is a fast IRQ flow handler for the GPIOs that
316 gets called in a chain from the parent IRQ handler, most typically the
322 static irqreturn_t foo_gpio_irq(int irq, void *data)
331 Realtime considerations: Note that chained IRQ handlers will not be forced
333 runtime) can't be used in a chained IRQ handler.
336 see below) a chained IRQ handler can be converted to generic irq handler and
337 this way it will become a threaded IRQ handler on -RT and a hard IRQ handler
340 The generic_handle_irq() is expected to be called with IRQ disabled,
341 so the IRQ core will complain if it is called from an IRQ handler which is
346 static irqreturn_t omap_gpio_irq_handler(int irq, void *gpiobank)
349 generic_handle_irq(irq_find_mapping(bank->chip.irq.domain, bit));
353 but chained IRQ handlers are not used. Instead GPIO IRQs dispatching is
354 performed by generic IRQ handler which is configured using request_irq().
358 static irqreturn_t gpio_rcar_irq_handler(int irq, void *dev_id)
359 for each detected GPIO IRQ
363 and as result the IRQ core will complain that generic_handle_irq() is called
364 with IRQ enabled and the same work-around as for "CHAINED GPIO irqchips" can
371 Of course such drivers that need slow bus traffic to read out IRQ status and
373 handled in a quick IRQ handler with IRQs disabled. Instead they need to spawn
374 a thread and then mask the parent IRQ line until the interrupt is handled
378 static irqreturn_t foo_gpio_irq(int irq, void *data)
380 handle_nested_irq(irq);
402 :header: GPIO line offset, Hardware IRQ
426 struct irq_chip irq;
429 int irq; /* from platform etc */
434 g->irq.name = "my_gpio_irq";
435 g->irq.irq_ack = my_gpio_ack_irq;
436 g->irq.irq_mask = my_gpio_mask_irq;
437 g->irq.irq_unmask = my_gpio_unmask_irq;
438 g->irq.irq_set_type = my_gpio_set_irq_type;
441 girq = &g->gc.irq;
442 girq->chip = &g->irq;
451 girq->parents[0] = irq;
463 struct irq_chip irq;
467 int irq; /* from platform etc */
472 g->irq.name = "my_gpio_irq";
473 g->irq.irq_ack = my_gpio_ack_irq;
474 g->irq.irq_mask = my_gpio_mask_irq;
475 g->irq.irq_unmask = my_gpio_unmask_irq;
476 g->irq.irq_set_type = my_gpio_set_irq_type;
479 girq = &g->gc.irq;
480 girq->chip = &g->irq;
490 the IRQ, instead a parent irqdomain, an fwnode for the hardware and
492 the parent hardware irq from a child (i.e. this gpio chip) hardware irq.
500 gpiochip. It will pass the struct gpio_chip* for the chip to all IRQ
507 cascaded irq has to be handled by a threaded interrupt handler.
510 - gpiochip_set_nested_irqchip(): sets up a nested cascaded irq handler for a
511 gpio_chip from a parent IRQ. As the parent IRQ has usually been
513 mark all the child IRQs as having the other IRQ as parent.
515 If there is a need to exclude certain GPIO lines from the IRQ domain handled by
516 these helpers, we can set .irq.need_valid_mask of the gpiochip before
518 .irq.valid_mask with as many bits set as there are GPIO lines in the chip, each
532 before using/enabling each GPIO IRQ. Then set the handler to
538 Locking IRQ usage
549 Input GPIOs can be used as IRQ signals. When this happens, a driver is requested
550 to mark the GPIO as being used as an IRQ::
554 This will prevent the use of non-irq related GPIO APIs until the GPIO IRQ lock
575 When a GPIO is used as an IRQ signal, then gpiolib also needs to know if
576 the IRQ is enabled or disabled. In order to inform gpiolib about this,
581 This allows drivers to drive the GPIO as an output while the IRQ is
582 disabled. When the IRQ is enabled again, a driver should call::
594 Real-Time compliance for GPIO IRQ chips
611 from the chained IRQ handler
614 - Chained GPIO irqchips: get rid of the chained IRQ handler and use generic irq