/* Set type if specified and different than the current one */ if (type != IRQ_TYPE_NONE && type != irq_get_trigger_type(virq)) irq_set_irq_type(virq, type);---E return virq; } A:这里的代码主要是找到irq domain。这是根据传递进来的参数irq_data的np成员来寻找的,具体定义如下: s...
irq_data->args_count, &hwirq, &type)) return 0; } /* Create mapping */ virq = irq_create_mapping(domain, hwirq);---D if (!virq) return virq; /* Set type if specified and different than the current one */ if (type != IRQ_TYPE_NONE && type != irq_get_trigger_type(vir...
/* Set type if specified and different than the current one */ if (type != IRQ_TYPE_NONE && type != irq_get_trigger_type(virq)) irq_set_irq_type(virq, type);---E return virq; } A:这里的代码主要是找到irq domain。这是根据传递进来的参数irq_data的np成员来寻找的,具体定义如下: s...
irq_of_parse_and_map的原理是当前实际的trigger和设备树的对比,然后分配中断号。我还以为直接从设备树获取呢?所以通过此代码我觉得设备树中我因为配置化为IRQ_TYPE_NONE。 另外一个问题,irq_free后怎么还有残留信息没有reset中断状态。导致再次加载读取当前type=3?暂时没有时间去分析源码。 四,小结 好吧,了解了这样...
unsigned int irq_create_fwspec_mapping(struct irq_fwspec *fwspec) { struct irq_domain *domain; struct irq_data *irq_data; irq_hw_number_t hwirq; unsigned int type = IRQ_TYPE_NONE; int virq; if (fwspec->fwnode) { domain = irq_find_matching_fwspec(fwspec, DOMAIN_BUS_WIRED); //irq...
#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ #define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ //上升沿触发 #define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ //下降沿触发 #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_...
retval = request_irq(uap->port.irq, pl011_int, 0, "uart-pl011", uap); #else retval = request_threaded_irq(uap->port.irq, NULL, pl011_int, IRQ_TYPE_NONE | IRQF_ONESHOT, "uart-pl011", uap); 【作者】张昺华 【微信公众号】 张昺华...
type = IRQ_TYPE_NONE; }gpiochip->to_irq = gpiochip_to_irq; gpiochip->irq.default_type = type;if (gpiochip->irq.domain_ops) ops = gpiochip->irq.domain_ops; else ops = &gpiochip_domain_ops;gpiochip->irq.domain = irq_domain_add_simple(np, gpiochip->ngpio, ...
简介: /* * Allocate the IRQ */ #if 0 retval = request_irq(uap->port.irq, pl011_int, 0, "uart-pl011", uap); #else retval = request_threaded_irq(uap->port.irq, NULL, pl011_int, IRQ_TYPE_NONE | IRQF_ONESHOT, "uart-pl011", uap); ...
retval = request_threaded_irq(uap->port.irq, NULL, pl011_int, IRQ_TYPE_NONE | IRQF_ONESHOT, "uart-pl011", uap); 【作者】张昺华 【出处】http://www.cnblogs.com/sky-heaven/ 【博客园】http://www.cnblogs.com/sky-heaven/ 【新浪博客】http://blog.sina.com.cn/u/2049150530 ...