如何到达MFD设备的irq基础? [英] How to arrive at irq base for an mfd device?

查看:130
本文介绍了如何到达MFD设备的irq基础?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

MFD设备中.我想了解我们如何到达irq base.它是一个随机数吗?

In an MFD device. I wanted to understand, how do we arrive at irq base. Is it a random number.?

请有人解释.

推荐答案

基本上,在尝试为该IRQ号注册ISR之前,首先需要将特定的IRQ号与实际的物理硬件中断相关联.这通常是在Linux内核中使用 irq_domain_add_linear() .

Basically one first needs to associate a particular IRQ number with an actual physical hardware interrupt before attempting to register an ISR for that IRQ number. This is commonly done in the Linux kernel using irq_domain_add_linear().

过去,可以选择IRQ编号,以便将其与硬件IRQ线匹配到根中断控制器(即,实际上将中断线触发到CPU的组件)如今,该编号只是一个数字 >.

irq_alloc_desc*() irq_free_desc*() API提供了irq编号分配,但它们不提供对控制器本地IRQ的反向映射的任何支持( hwirq)号插入Linux IRQ号空间.

The irq_alloc_desc*() and irq_free_desc*() APIs provide allocation of irq numbers, but they don't provide any support for reverse mapping of the controller-local IRQ (hwirq) number into the Linux IRQ number space.

Linux内核的当前设计使用单个较大的数字空间,其中为每个单独的IRQ源分配了一个不同的数字.当只有一个中断控制器时,这很简单,但是在具有多个中断控制器的系统中,内核必须确保为每个中断控制器分配了不重叠的Linux IRQ号分配.

The current design of the Linux kernel uses a single large number space where each separate IRQ source is assigned a different number. This is simple when there is only one interrupt controller, but in systems with multiple interrupt controllers the kernel must ensure that each one gets assigned non-overlapping allocations of Linux IRQ numbers.

更多详细信息,请参见Linux内核 文档/IRQ域. txt .

More details in the Linux-kernel Documentation/IRQ-domain.txt.

这篇关于如何到达MFD设备的irq基础?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆