Specifying interrupt information for devices
============================================ 1) Interrupt client nodes
------------------------- Nodes that describe devices which generate interrupts must contain an
"interrupts" property, an "interrupts-extended" property, or both. If both are
present, the latter should take precedence; the former may be provided simply
for compatibility with software that does not recognize the latter. These
properties contain a list of interrupt specifiers, one per output interrupt. The
format of the interrupt specifier is determined by the interrupt controller to
which the interrupts are routed; see section 2 below for details. Example:
interrupt-parent = <&intc1>;
interrupts = <5 0>, <6 0>; The "interrupt-parent" property is used to specify the controller to which
interrupts are routed and contains a single phandle referring to the interrupt
controller node. This property is inherited, so it may be specified in an
interrupt client node or in any of its parent nodes. Interrupts listed in the
"interrupts" property are always in reference to the node's interrupt parent. The "interrupts-extended" property is a special form for use when a node needs
to reference multiple interrupt parents. Each entry in this property contains
both the parent phandle and the interrupt specifier. "interrupts-extended"
should only be used when a device has multiple interrupt parents. Example:
interrupts-extended = <&intc1 5 1>, <&intc2 1 0>; 2) Interrupt controller nodes
----------------------------- A device is marked as an interrupt controller with the "interrupt-controller"
property. This is a empty, boolean property. An additional "#interrupt-cells"
property defines the number of cells needed to specify a single interrupt. It is the responsibility of the interrupt controller's binding to define the
length and format of the interrupt specifier. The following two variants are
commonly used: a) one cell
-----------
The #interrupt-cells property is set to 1 and the single cell defines the
index of the interrupt within the controller. Example: vic: intc@10140000 {
compatible = "arm,versatile-vic";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x10140000 0x1000>;
}; sic: intc@10003000 {
compatible = "arm,versatile-sic";
interrupt-controller;
#interrupt-cells = <1>;
reg = <0x10003000 0x1000>;
interrupt-parent = <&vic>;
interrupts = <31>; /* Cascaded to vic */
}; b) two cells
------------
The #interrupt-cells property is set to 2 and the first cell defines the
index of the interrupt within the controller, while the second cell is used
to specify any of the following flags:
- bits[3:0] trigger type and level flags
1 = low-to-high edge triggered
2 = high-to-low edge triggered
4 = active high level-sensitive
8 = active low level-sensitive Example: i2c@7000c000 {
gpioext: gpio-adnp@41 {
compatible = "ad,gpio-adnp";
reg = <0x41>; interrupt-parent = <&gpio>;
interrupts = <160 1>; gpio-controller;
#gpio-cells = <1>; interrupt-controller;
#interrupt-cells = <2>; nr-gpios = <64>;
}; sx8634@2b {
compatible = "smtc,sx8634";
reg = <0x2b>; interrupt-parent = <&gpioext>;
interrupts = <3 0x8>; #address-cells = <1>;
#size-cells = <0>; threshold = <0x40>;
sensitivity = <7>;
};
};

reference

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

心得

interrupts 裡面填的 interrupt number 是指 interrupt parent (interrupt controller)的 第 index interrupt 。

[device tree] interrupt的更多相关文章

  1. [device tree] interrupt mapping example

    This is for Devicetree Specification Release 0.1 Interrupt Mapping Example p19 在講解前,先帶進一些 PCI 的基礎觀念 ...

  2. Device Tree Usage( DTS文件语法)

    http://elinux.org/Device_Tree_Usage Device Tree Usage     Top Device Tree page This page walks throu ...

  3. Device Tree Usage(理解DTS文件语法)

    Basic Data Format The device tree is a simple tree structure of nodes and properties. Properties are ...

  4. Device Tree Usage 【转】

    转自:http://blog.chinaunix.net/uid-20522771-id-3457184.html 原文链接:http://devicetree.org/Device_Tree_Usa ...

  5. Device Tree(二):基本概念

    转自:http://www.wowotech.net/linux_kenrel/dt_basic_concept.html 一.前言 一些背景知识(例如:为何要引入Device Tree,这个机制是用 ...

  6. Linux and the Device Tree

    来之\kernel\Documentation\devicetree\usage-model.txt Linux and the Device Tree ----------------------- ...

  7. Device Tree(三):代码分析【转】

    转自:http://www.wowotech.net/linux_kenrel/dt-code-analysis.html Device Tree(三):代码分析 作者:linuxer 发布于:201 ...

  8. ARM Linux 3.x的设备树(Device Tree)

    http://blog.csdn.net/21cnbao/article/details/8457546 宋宝华 Barry Song <21cnbao@gmail.com> 1.     ...

  9. ARM Linux 3.x的设备树(Device Tree)

    1. ARM Device Tree起源 Linus Torvalds在2011年3月17日的ARM Linux邮件列表宣称“this whole ARM thing is a f*cking pai ...

随机推荐

  1. css样式 一定要reset?

    有大神讲过了,直接看http://www.zhangxinxu.com/wordpress/?p=758

  2. 【bzoj3732】Network 最小生成树+倍增LCA

    题目描述 给你N个点的无向图 (1 <= N <= 15,000),记为:1…N. 图中有M条边 (1 <= M <= 30,000) ,第j条边的长度为: d_j ( 1 & ...

  3. [洛谷P4171][JSOI2010]满汉全席

    题目大意:有$n$个点,每个点可以选或不选,有$m$组约束,形如$a,u,b,v$,表示$u=a,v=b$中至少要满足一个条件,问是否存在一组解,多组询问 题解:$2-SAT$,感觉是板子题呀,最后判 ...

  4. android getpost代码

    GetPostUtil public class GetPostUtil { /** * 向指定URL发送GET方法的请求 * * @param url * 发送请求的URL * @param par ...

  5. 再来说一说sudo

    app        ALL = (ALL:ALL) ALL eric.zhan ALL = (app : app) ALLDefaults:eric.zhan runas_default=app 如 ...

  6. 如何更有效使用 Rational AppScan 扫描大型网站,第 1 部分: 工作原理及技术分析

    Rational AppScan 工作原理 Rational AppScan(简称 AppScan)其实是一个产品家族,包括众多的应用安全扫描产品,从开发阶段的源代码扫描的 AppScan sourc ...

  7. shell 将字符串作为变量名并打印

    使用shell的eval实现此功能.代码如下: #!/bin/sh IP9="127.0.0.1" i=9 eval echo \$IP${i} #!/bin/sh WEBIP0= ...

  8. emqtt新版升级一些事项和操作

    注解 Erlang/OTP R19依赖lksctp-tools库 yum install lksctp-tools 控制台地址: http://127.0.0.1:18083,默认用户: admin, ...

  9. SpringMVC+MyBatis 返回时间格式转换的解决方案

    Spring MVC 4.X ResponseBody 日期类型Json 处理 摘自http://tramp-zzy.iteye.com/blog/2090330  2014-07-10 方法一:全局 ...

  10. $.ajax() 方法的理解

    jquery中的ajax方法理解,AJAX即“Asynchronous Javascript And XML”(异步JavaScript和XML),是指一种创建交互式网页应用的网页开发技术.AJAX ...