2 * linux/kernel/irq/chip.c
4 * Copyright (C) 1992, 1998-2006 Linus Torvalds, Ingo Molnar
5 * Copyright (C) 2005-2006, Thomas Gleixner, Russell King
7 * This file contains the core interrupt handling code, for irq-chip
10 * Detailed information is available in Documentation/DocBook/genericirq
13 #include <linux/irq.h>
14 #include <linux/msi.h>
15 #include <linux/module.h>
16 #include <linux/interrupt.h>
17 #include <linux/kernel_stat.h>
18 #include <linux/irqdomain.h>
20 #include <trace/events/irq.h>
22 #include "internals.h"
25 * irq_set_chip - set the irq chip for an irq
27 * @chip: pointer to irq chip description structure
29 int irq_set_chip(unsigned int irq, struct irq_chip *chip)
32 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
40 desc->irq_data.chip = chip;
41 irq_put_desc_unlock(desc, flags);
43 * For !CONFIG_SPARSE_IRQ make the irq show up in
49 EXPORT_SYMBOL(irq_set_chip);
52 * irq_set_type - set the irq trigger type for an irq
54 * @type: IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h
56 int irq_set_irq_type(unsigned int irq, unsigned int type)
59 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
65 type &= IRQ_TYPE_SENSE_MASK;
66 ret = __irq_set_trigger(desc, irq, type);
67 irq_put_desc_busunlock(desc, flags);
70 EXPORT_SYMBOL(irq_set_irq_type);
73 * irq_set_handler_data - set irq handler data for an irq
74 * @irq: Interrupt number
75 * @data: Pointer to interrupt specific data
77 * Set the hardware irq controller data for an irq
79 int irq_set_handler_data(unsigned int irq, void *data)
82 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
86 desc->irq_data.handler_data = data;
87 irq_put_desc_unlock(desc, flags);
90 EXPORT_SYMBOL(irq_set_handler_data);
93 * irq_set_msi_desc_off - set MSI descriptor data for an irq at offset
94 * @irq_base: Interrupt number base
95 * @irq_offset: Interrupt number offset
96 * @entry: Pointer to MSI descriptor data
98 * Set the MSI descriptor entry for an irq at offset
100 int irq_set_msi_desc_off(unsigned int irq_base, unsigned int irq_offset,
101 struct msi_desc *entry)
104 struct irq_desc *desc = irq_get_desc_lock(irq_base + irq_offset, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
108 desc->irq_data.msi_desc = entry;
109 if (entry && !irq_offset)
110 entry->irq = irq_base;
111 irq_put_desc_unlock(desc, flags);
116 * irq_set_msi_desc - set MSI descriptor data for an irq
117 * @irq: Interrupt number
118 * @entry: Pointer to MSI descriptor data
120 * Set the MSI descriptor entry for an irq
122 int irq_set_msi_desc(unsigned int irq, struct msi_desc *entry)
124 return irq_set_msi_desc_off(irq, 0, entry);
128 * irq_set_chip_data - set irq chip data for an irq
129 * @irq: Interrupt number
130 * @data: Pointer to chip specific data
132 * Set the hardware irq chip data for an irq
134 int irq_set_chip_data(unsigned int irq, void *data)
137 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
141 desc->irq_data.chip_data = data;
142 irq_put_desc_unlock(desc, flags);
145 EXPORT_SYMBOL(irq_set_chip_data);
147 struct irq_data *irq_get_irq_data(unsigned int irq)
149 struct irq_desc *desc = irq_to_desc(irq);
151 return desc ? &desc->irq_data : NULL;
153 EXPORT_SYMBOL_GPL(irq_get_irq_data);
155 static void irq_state_clr_disabled(struct irq_desc *desc)
157 irqd_clear(&desc->irq_data, IRQD_IRQ_DISABLED);
160 static void irq_state_set_disabled(struct irq_desc *desc)
162 irqd_set(&desc->irq_data, IRQD_IRQ_DISABLED);
165 static void irq_state_clr_masked(struct irq_desc *desc)
167 irqd_clear(&desc->irq_data, IRQD_IRQ_MASKED);
170 static void irq_state_set_masked(struct irq_desc *desc)
172 irqd_set(&desc->irq_data, IRQD_IRQ_MASKED);
175 int irq_startup(struct irq_desc *desc, bool resend)
179 irq_state_clr_disabled(desc);
182 irq_domain_activate_irq(&desc->irq_data);
183 if (desc->irq_data.chip->irq_startup) {
184 ret = desc->irq_data.chip->irq_startup(&desc->irq_data);
185 irq_state_clr_masked(desc);
190 check_irq_resend(desc, desc->irq_data.irq);
194 void irq_shutdown(struct irq_desc *desc)
196 irq_state_set_disabled(desc);
198 if (desc->irq_data.chip->irq_shutdown)
199 desc->irq_data.chip->irq_shutdown(&desc->irq_data);
200 else if (desc->irq_data.chip->irq_disable)
201 desc->irq_data.chip->irq_disable(&desc->irq_data);
203 desc->irq_data.chip->irq_mask(&desc->irq_data);
204 irq_domain_deactivate_irq(&desc->irq_data);
205 irq_state_set_masked(desc);
208 void irq_enable(struct irq_desc *desc)
210 irq_state_clr_disabled(desc);
211 if (desc->irq_data.chip->irq_enable)
212 desc->irq_data.chip->irq_enable(&desc->irq_data);
214 desc->irq_data.chip->irq_unmask(&desc->irq_data);
215 irq_state_clr_masked(desc);
219 * irq_disable - Mark interrupt disabled
220 * @desc: irq descriptor which should be disabled
222 * If the chip does not implement the irq_disable callback, we
223 * use a lazy disable approach. That means we mark the interrupt
224 * disabled, but leave the hardware unmasked. That's an
225 * optimization because we avoid the hardware access for the
226 * common case where no interrupt happens after we marked it
227 * disabled. If an interrupt happens, then the interrupt flow
228 * handler masks the line at the hardware level and marks it
231 void irq_disable(struct irq_desc *desc)
233 irq_state_set_disabled(desc);
234 if (desc->irq_data.chip->irq_disable) {
235 desc->irq_data.chip->irq_disable(&desc->irq_data);
236 irq_state_set_masked(desc);
240 void irq_percpu_enable(struct irq_desc *desc, unsigned int cpu)
242 if (desc->irq_data.chip->irq_enable)
243 desc->irq_data.chip->irq_enable(&desc->irq_data);
245 desc->irq_data.chip->irq_unmask(&desc->irq_data);
246 cpumask_set_cpu(cpu, desc->percpu_enabled);
249 void irq_percpu_disable(struct irq_desc *desc, unsigned int cpu)
251 if (desc->irq_data.chip->irq_disable)
252 desc->irq_data.chip->irq_disable(&desc->irq_data);
254 desc->irq_data.chip->irq_mask(&desc->irq_data);
255 cpumask_clear_cpu(cpu, desc->percpu_enabled);
258 static inline void mask_ack_irq(struct irq_desc *desc)
260 if (desc->irq_data.chip->irq_mask_ack)
261 desc->irq_data.chip->irq_mask_ack(&desc->irq_data);
263 desc->irq_data.chip->irq_mask(&desc->irq_data);
264 if (desc->irq_data.chip->irq_ack)
265 desc->irq_data.chip->irq_ack(&desc->irq_data);
267 irq_state_set_masked(desc);
270 void mask_irq(struct irq_desc *desc)
272 if (desc->irq_data.chip->irq_mask) {
273 desc->irq_data.chip->irq_mask(&desc->irq_data);
274 irq_state_set_masked(desc);
278 void unmask_irq(struct irq_desc *desc)
280 if (desc->irq_data.chip->irq_unmask) {
281 desc->irq_data.chip->irq_unmask(&desc->irq_data);
282 irq_state_clr_masked(desc);
286 void unmask_threaded_irq(struct irq_desc *desc)
288 struct irq_chip *chip = desc->irq_data.chip;
290 if (chip->flags & IRQCHIP_EOI_THREADED)
291 chip->irq_eoi(&desc->irq_data);
293 if (chip->irq_unmask) {
294 chip->irq_unmask(&desc->irq_data);
295 irq_state_clr_masked(desc);
300 * handle_nested_irq - Handle a nested irq from a irq thread
301 * @irq: the interrupt number
303 * Handle interrupts which are nested into a threaded interrupt
304 * handler. The handler function is called inside the calling
307 void handle_nested_irq(unsigned int irq)
309 struct irq_desc *desc = irq_to_desc(irq);
310 struct irqaction *action;
311 irqreturn_t action_ret;
315 raw_spin_lock_irq(&desc->lock);
317 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
318 kstat_incr_irqs_this_cpu(irq, desc);
320 action = desc->action;
321 if (unlikely(!action || irqd_irq_disabled(&desc->irq_data))) {
322 desc->istate |= IRQS_PENDING;
326 irqd_set(&desc->irq_data, IRQD_IRQ_INPROGRESS);
327 raw_spin_unlock_irq(&desc->lock);
329 action_ret = action->thread_fn(action->irq, action->dev_id);
331 note_interrupt(irq, desc, action_ret);
333 raw_spin_lock_irq(&desc->lock);
334 irqd_clear(&desc->irq_data, IRQD_IRQ_INPROGRESS);
337 raw_spin_unlock_irq(&desc->lock);
339 EXPORT_SYMBOL_GPL(handle_nested_irq);
341 static bool irq_check_poll(struct irq_desc *desc)
343 if (!(desc->istate & IRQS_POLL_INPROGRESS))
345 return irq_wait_for_poll(desc);
348 static bool irq_may_run(struct irq_desc *desc)
350 unsigned int mask = IRQD_IRQ_INPROGRESS | IRQD_WAKEUP_ARMED;
353 * If the interrupt is not in progress and is not an armed
354 * wakeup interrupt, proceed.
356 if (!irqd_has_set(&desc->irq_data, mask))
360 * If the interrupt is an armed wakeup source, mark it pending
361 * and suspended, disable it and notify the pm core about the
364 if (irq_pm_check_wakeup(desc))
368 * Handle a potential concurrent poll on a different core.
370 return irq_check_poll(desc);
374 * handle_simple_irq - Simple and software-decoded IRQs.
375 * @irq: the interrupt number
376 * @desc: the interrupt description structure for this irq
378 * Simple interrupts are either sent from a demultiplexing interrupt
379 * handler or come from hardware, where no interrupt hardware control
382 * Note: The caller is expected to handle the ack, clear, mask and
383 * unmask issues if necessary.
386 handle_simple_irq(unsigned int irq, struct irq_desc *desc)
388 raw_spin_lock(&desc->lock);
390 if (!irq_may_run(desc))
393 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
394 kstat_incr_irqs_this_cpu(irq, desc);
396 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
397 desc->istate |= IRQS_PENDING;
401 handle_irq_event(desc);
404 raw_spin_unlock(&desc->lock);
406 EXPORT_SYMBOL_GPL(handle_simple_irq);
409 * Called unconditionally from handle_level_irq() and only for oneshot
410 * interrupts from handle_fasteoi_irq()
412 static void cond_unmask_irq(struct irq_desc *desc)
415 * We need to unmask in the following cases:
416 * - Standard level irq (IRQF_ONESHOT is not set)
417 * - Oneshot irq which did not wake the thread (caused by a
418 * spurious interrupt or a primary handler handling it
421 if (!irqd_irq_disabled(&desc->irq_data) &&
422 irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot)
427 * handle_level_irq - Level type irq handler
428 * @irq: the interrupt number
429 * @desc: the interrupt description structure for this irq
431 * Level type interrupts are active as long as the hardware line has
432 * the active level. This may require to mask the interrupt and unmask
433 * it after the associated handler has acknowledged the device, so the
434 * interrupt line is back to inactive.
437 handle_level_irq(unsigned int irq, struct irq_desc *desc)
439 raw_spin_lock(&desc->lock);
442 if (!irq_may_run(desc))
445 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
446 kstat_incr_irqs_this_cpu(irq, desc);
449 * If its disabled or no action available
450 * keep it masked and get out of here
452 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
453 desc->istate |= IRQS_PENDING;
457 handle_irq_event(desc);
459 cond_unmask_irq(desc);
462 raw_spin_unlock(&desc->lock);
464 EXPORT_SYMBOL_GPL(handle_level_irq);
466 #ifdef CONFIG_IRQ_PREFLOW_FASTEOI
467 static inline void preflow_handler(struct irq_desc *desc)
469 if (desc->preflow_handler)
470 desc->preflow_handler(&desc->irq_data);
473 static inline void preflow_handler(struct irq_desc *desc) { }
476 static void cond_unmask_eoi_irq(struct irq_desc *desc, struct irq_chip *chip)
478 if (!(desc->istate & IRQS_ONESHOT)) {
479 chip->irq_eoi(&desc->irq_data);
483 * We need to unmask in the following cases:
484 * - Oneshot irq which did not wake the thread (caused by a
485 * spurious interrupt or a primary handler handling it
488 if (!irqd_irq_disabled(&desc->irq_data) &&
489 irqd_irq_masked(&desc->irq_data) && !desc->threads_oneshot) {
490 chip->irq_eoi(&desc->irq_data);
492 } else if (!(chip->flags & IRQCHIP_EOI_THREADED)) {
493 chip->irq_eoi(&desc->irq_data);
498 * handle_fasteoi_irq - irq handler for transparent controllers
499 * @irq: the interrupt number
500 * @desc: the interrupt description structure for this irq
502 * Only a single callback will be issued to the chip: an ->eoi()
503 * call when the interrupt has been serviced. This enables support
504 * for modern forms of interrupt handlers, which handle the flow
505 * details in hardware, transparently.
508 handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
510 struct irq_chip *chip = desc->irq_data.chip;
512 raw_spin_lock(&desc->lock);
514 if (!irq_may_run(desc))
517 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
518 kstat_incr_irqs_this_cpu(irq, desc);
521 * If its disabled or no action available
522 * then mask it and get out of here:
524 if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
525 desc->istate |= IRQS_PENDING;
530 if (desc->istate & IRQS_ONESHOT)
533 preflow_handler(desc);
534 handle_irq_event(desc);
536 cond_unmask_eoi_irq(desc, chip);
538 raw_spin_unlock(&desc->lock);
541 if (!(chip->flags & IRQCHIP_EOI_IF_HANDLED))
542 chip->irq_eoi(&desc->irq_data);
543 raw_spin_unlock(&desc->lock);
545 EXPORT_SYMBOL_GPL(handle_fasteoi_irq);
548 * handle_edge_irq - edge type IRQ handler
549 * @irq: the interrupt number
550 * @desc: the interrupt description structure for this irq
552 * Interrupt occures on the falling and/or rising edge of a hardware
553 * signal. The occurrence is latched into the irq controller hardware
554 * and must be acked in order to be reenabled. After the ack another
555 * interrupt can happen on the same source even before the first one
556 * is handled by the associated event handler. If this happens it
557 * might be necessary to disable (mask) the interrupt depending on the
558 * controller hardware. This requires to reenable the interrupt inside
559 * of the loop which handles the interrupts which have arrived while
560 * the handler was running. If all pending interrupts are handled, the
564 handle_edge_irq(unsigned int irq, struct irq_desc *desc)
566 raw_spin_lock(&desc->lock);
568 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
570 if (!irq_may_run(desc)) {
571 desc->istate |= IRQS_PENDING;
577 * If its disabled or no action available then mask it and get
580 if (irqd_irq_disabled(&desc->irq_data) || !desc->action) {
581 desc->istate |= IRQS_PENDING;
586 kstat_incr_irqs_this_cpu(irq, desc);
588 /* Start handling the irq */
589 desc->irq_data.chip->irq_ack(&desc->irq_data);
592 if (unlikely(!desc->action)) {
598 * When another irq arrived while we were handling
599 * one, we could have masked the irq.
600 * Renable it, if it was not disabled in meantime.
602 if (unlikely(desc->istate & IRQS_PENDING)) {
603 if (!irqd_irq_disabled(&desc->irq_data) &&
604 irqd_irq_masked(&desc->irq_data))
608 handle_irq_event(desc);
610 } while ((desc->istate & IRQS_PENDING) &&
611 !irqd_irq_disabled(&desc->irq_data));
614 raw_spin_unlock(&desc->lock);
616 EXPORT_SYMBOL(handle_edge_irq);
618 #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
620 * handle_edge_eoi_irq - edge eoi type IRQ handler
621 * @irq: the interrupt number
622 * @desc: the interrupt description structure for this irq
624 * Similar as the above handle_edge_irq, but using eoi and w/o the
627 void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc)
629 struct irq_chip *chip = irq_desc_get_chip(desc);
631 raw_spin_lock(&desc->lock);
633 desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
635 if (!irq_may_run(desc)) {
636 desc->istate |= IRQS_PENDING;
641 * If its disabled or no action available then mask it and get
644 if (irqd_irq_disabled(&desc->irq_data) || !desc->action) {
645 desc->istate |= IRQS_PENDING;
649 kstat_incr_irqs_this_cpu(irq, desc);
652 if (unlikely(!desc->action))
655 handle_irq_event(desc);
657 } while ((desc->istate & IRQS_PENDING) &&
658 !irqd_irq_disabled(&desc->irq_data));
661 chip->irq_eoi(&desc->irq_data);
662 raw_spin_unlock(&desc->lock);
667 * handle_percpu_irq - Per CPU local irq handler
668 * @irq: the interrupt number
669 * @desc: the interrupt description structure for this irq
671 * Per CPU interrupts on SMP machines without locking requirements
674 handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
676 struct irq_chip *chip = irq_desc_get_chip(desc);
678 kstat_incr_irqs_this_cpu(irq, desc);
681 chip->irq_ack(&desc->irq_data);
683 handle_irq_event_percpu(desc, desc->action);
686 chip->irq_eoi(&desc->irq_data);
690 * handle_percpu_devid_irq - Per CPU local irq handler with per cpu dev ids
691 * @irq: the interrupt number
692 * @desc: the interrupt description structure for this irq
694 * Per CPU interrupts on SMP machines without locking requirements. Same as
695 * handle_percpu_irq() above but with the following extras:
697 * action->percpu_dev_id is a pointer to percpu variables which
698 * contain the real device id for the cpu on which this handler is
701 void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc)
703 struct irq_chip *chip = irq_desc_get_chip(desc);
704 struct irqaction *action = desc->action;
705 void *dev_id = raw_cpu_ptr(action->percpu_dev_id);
708 kstat_incr_irqs_this_cpu(irq, desc);
711 chip->irq_ack(&desc->irq_data);
713 trace_irq_handler_entry(irq, action);
714 res = action->handler(irq, dev_id);
715 trace_irq_handler_exit(irq, action, res);
718 chip->irq_eoi(&desc->irq_data);
722 __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
726 struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, 0);
732 handle = handle_bad_irq;
734 if (WARN_ON(desc->irq_data.chip == &no_irq_chip))
739 if (handle == handle_bad_irq) {
740 if (desc->irq_data.chip != &no_irq_chip)
742 irq_state_set_disabled(desc);
745 desc->handle_irq = handle;
748 if (handle != handle_bad_irq && is_chained) {
749 irq_settings_set_noprobe(desc);
750 irq_settings_set_norequest(desc);
751 irq_settings_set_nothread(desc);
752 irq_startup(desc, true);
755 irq_put_desc_busunlock(desc, flags);
757 EXPORT_SYMBOL_GPL(__irq_set_handler);
760 irq_set_chip_and_handler_name(unsigned int irq, struct irq_chip *chip,
761 irq_flow_handler_t handle, const char *name)
763 irq_set_chip(irq, chip);
764 __irq_set_handler(irq, handle, 0, name);
766 EXPORT_SYMBOL_GPL(irq_set_chip_and_handler_name);
768 void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
771 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
775 irq_settings_clr_and_set(desc, clr, set);
777 irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU |
778 IRQD_TRIGGER_MASK | IRQD_LEVEL | IRQD_MOVE_PCNTXT);
779 if (irq_settings_has_no_balance_set(desc))
780 irqd_set(&desc->irq_data, IRQD_NO_BALANCING);
781 if (irq_settings_is_per_cpu(desc))
782 irqd_set(&desc->irq_data, IRQD_PER_CPU);
783 if (irq_settings_can_move_pcntxt(desc))
784 irqd_set(&desc->irq_data, IRQD_MOVE_PCNTXT);
785 if (irq_settings_is_level(desc))
786 irqd_set(&desc->irq_data, IRQD_LEVEL);
788 irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc));
790 irq_put_desc_unlock(desc, flags);
792 EXPORT_SYMBOL_GPL(irq_modify_status);
795 * irq_cpu_online - Invoke all irq_cpu_online functions.
797 * Iterate through all irqs and invoke the chip.irq_cpu_online()
800 void irq_cpu_online(void)
802 struct irq_desc *desc;
803 struct irq_chip *chip;
807 for_each_active_irq(irq) {
808 desc = irq_to_desc(irq);
812 raw_spin_lock_irqsave(&desc->lock, flags);
814 chip = irq_data_get_irq_chip(&desc->irq_data);
815 if (chip && chip->irq_cpu_online &&
816 (!(chip->flags & IRQCHIP_ONOFFLINE_ENABLED) ||
817 !irqd_irq_disabled(&desc->irq_data)))
818 chip->irq_cpu_online(&desc->irq_data);
820 raw_spin_unlock_irqrestore(&desc->lock, flags);
825 * irq_cpu_offline - Invoke all irq_cpu_offline functions.
827 * Iterate through all irqs and invoke the chip.irq_cpu_offline()
830 void irq_cpu_offline(void)
832 struct irq_desc *desc;
833 struct irq_chip *chip;
837 for_each_active_irq(irq) {
838 desc = irq_to_desc(irq);
842 raw_spin_lock_irqsave(&desc->lock, flags);
844 chip = irq_data_get_irq_chip(&desc->irq_data);
845 if (chip && chip->irq_cpu_offline &&
846 (!(chip->flags & IRQCHIP_ONOFFLINE_ENABLED) ||
847 !irqd_irq_disabled(&desc->irq_data)))
848 chip->irq_cpu_offline(&desc->irq_data);
850 raw_spin_unlock_irqrestore(&desc->lock, flags);
854 #ifdef CONFIG_IRQ_DOMAIN_HIERARCHY
856 * irq_chip_ack_parent - Acknowledge the parent interrupt
857 * @data: Pointer to interrupt specific data
859 void irq_chip_ack_parent(struct irq_data *data)
861 data = data->parent_data;
862 data->chip->irq_ack(data);
866 * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware
867 * @data: Pointer to interrupt specific data
869 * Iterate through the domain hierarchy of the interrupt and check
870 * whether a hw retrigger function exists. If yes, invoke it.
872 int irq_chip_retrigger_hierarchy(struct irq_data *data)
874 for (data = data->parent_data; data; data = data->parent_data)
875 if (data->chip && data->chip->irq_retrigger)
876 return data->chip->irq_retrigger(data);