Convert the following case: struct irq_data *irq_data = irq_get_irq_data(irq); if (irq_data && irqd_get_trigger_type(irq_data) ... ) { ... } to the simpler: if (irq_get_trigger_type(irq) ... ) { ... } by using the irq_get_trigger_type() function. Suggested-by: Andy...
至于IRQ标志:of_irq_get()(在上面的代码中)最终调用irqd_set_trigger_type(),它在内部存储IRQ标志(从设备树读取)作为中断号.因此,当您调用devm_request_irq()时,它最终会在__setup_irq()中结束,然后执行下一步: /* * If the trigger type is not specified by the caller, * then use the default fo...
来到这个接口函数,第一个问题就是:为何irq_set_chip接口函数使用irq_get_desc_lock来获取中断描述符,而irq_set_irq_type这个函数却需要irq_get_desc_buslock呢?其实也很简单,irq_set_chip不需要访问底层的irq chip(也就是interrupt controller),但是irq_set_irq_type需要。设定一个IRQ的trigger type最终要调用des...
if (irqd_trigger_type_was_set(&desc->irq_data)) { oldtype = irqd_get_trigger_type(&desc->irq_data); } else { oldtype = new->flags & IRQF_TRIGGER_MASK; irqd_set_trigger_type(&desc->irq_data, oldtype); } if (!((old->flags & new->flags) & IRQF_SHARED) || (oldtype !
#更新struct irqaction*new中的irq numbernew->irq =irq;/** If the trigger type is not specified by the caller, * then use the default for this interrupt.*/#没有设置中断触发类型的话,则用默认值.if(!(new->flags &IRQF_TRIGGER_MASK))new->flags |= irqd_get_trigger_type(&desc->irq_dat...
*/ if (r && r->flags & IORESOURCE_BITS) { struct irq_data *irqd; irqd = irq_get_irq_data(r->start); if (!irqd) return -ENXIO; irqd_set_trigger_type(irqd, r->flags & IORESOURCE_BITS); } return r ? r->start : -ENXIO; #endif } 1. 2. 3. 4. 5. 6. 7. 8. 9....
来到这个接口函数,第一个问题就是:为何irq_set_chip接口函数使用irq_get_desc_lock来获取中断描述符,而irq_set_irq_type这个函数却需要irq_get_desc_buslock呢?其实也很简单,irq_set_chip不需要访问底层的irq chip(也就是interrupt controller),但是irq_set_irq_type需要。设定一个IRQ的trigger type最终要调用des...
irq_get_trigger_type will always send back 0. Those 2 patches propose a way to retrieve the correct interrupt polarity/type from a GpioInt acpi declaration when using irq_get_trigger_type. Best Regards Christophe Christophe Ricard (2): ...
enable_percpu_irq(imsic_parent_irq, irq_get_trigger_type(imsic_parent_irq));/* Setup IPIs */ imsic_ipi_starting_cpu();/* * Interrupts identities might have been enabled/disabled while * this CPU was not running so sync-up local enable/disable state. ...
/* Prevents SW retriggers which mess up the ACK/EOI ordering */ irqd_set_handle_enforce_irqctx(irqd); return 0; } 5、使用示例: xxxx_yyyy_engine { compatible = "xxxx,yyyy_engine"; interrupts = <0 52 0x4>,<0 57 0x4>; // 两个硬件中断号 ...