[device tree] interrupt
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
心得
interrupts 裡面填的 interrupt number 是指 interrupt parent (interrupt controller)的 第 index interrupt 。
[device tree] interrupt的更多相关文章
- [device tree] interrupt mapping example
This is for Devicetree Specification Release 0.1 Interrupt Mapping Example p19 在講解前,先帶進一些 PCI 的基礎觀念 ...
- Device Tree Usage( DTS文件语法)
http://elinux.org/Device_Tree_Usage Device Tree Usage Top Device Tree page This page walks throu ...
- Device Tree Usage(理解DTS文件语法)
Basic Data Format The device tree is a simple tree structure of nodes and properties. Properties are ...
- Device Tree Usage 【转】
转自:http://blog.chinaunix.net/uid-20522771-id-3457184.html 原文链接:http://devicetree.org/Device_Tree_Usa ...
- Device Tree(二):基本概念
转自:http://www.wowotech.net/linux_kenrel/dt_basic_concept.html 一.前言 一些背景知识(例如:为何要引入Device Tree,这个机制是用 ...
- Linux and the Device Tree
来之\kernel\Documentation\devicetree\usage-model.txt Linux and the Device Tree ----------------------- ...
- Device Tree(三):代码分析【转】
转自:http://www.wowotech.net/linux_kenrel/dt-code-analysis.html Device Tree(三):代码分析 作者:linuxer 发布于:201 ...
- ARM Linux 3.x的设备树(Device Tree)
http://blog.csdn.net/21cnbao/article/details/8457546 宋宝华 Barry Song <21cnbao@gmail.com> 1. ...
- 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 ...
随机推荐
- [Leetcode] 1.Two Sum(unordered_map)
1.首先想到的方法就是两个for循环全部遍历,代码如下,可通过,但效率太低 class Solution { public: vector<int> twoSum(vector<in ...
- 廖雪峰老师Python教程读后笔记
廖老师网站:http://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000 花几天时间看了廖老师的 ...
- 前端开发学习之——dom ready和window onload的区别
1.ready事件是在页面中所有DOM结构已完全加载时执行,监听的是 DomContentload 事件,初始化并解析完成时触发,不需要等待样式表.图片和 iframes 加载完,也就是说当这个事件触 ...
- CentOS 访问控制列表(tcp wrappers)
1.TCP Wrappers是一个工作在应用层的安全工具,它只能针对某些具体的应用或者服务起到一定的防护作用.比如说ssh.telnet.FTP等服务的请求,都会先受到TCP Wrappers的拦截. ...
- Unable to open connection to "Microsoft SQL Server, provider V1.0.5000.0 in framework
解决办法:1 以管理员身份登陆2 找到ORACLE_HOME文件夹(D:\oracle\ora92),点右键,选属性——安全,在组或用户栏中选"Authenticated Users&quo ...
- Android Fragment 使用详解
虽然网上有很多关于Fragment的文章,但我这里还是要写这篇笔记,因为我在编写程序的过程中发现了一个问题,至今未解决,希望得到大家的帮助: PS:当我在Fragment中定义一个名为setIndex ...
- BZOJ3523 [Poi2014]Bricks 【贪心】
题目链接 BZOJ3523 题解 简单的贪心题 优先与上一个不一样且数量最多的,如果有多个相同,则优先选择非结尾颜色 比较显然,但不知怎么证 #include<algorithm> #in ...
- atom的快捷键,你hold住吗?
命令面板:Ctrl+Shift+P设置窗口:Ctrl+,另存为: Ctrl+Shift+S添加文件:Ctrl+O添加文件夹:Ctrl+Alt+O工程内查找 :Cmd+Shift+F a,m,delet ...
- React组件通信
1.父子通信 父 -> 子 props子 -> 父 回调函数,父组件通过props向子组件传递一个函数,子组件调用函数,父组件在回调函数中用setState改变自身状态 2.跨层级通信 1 ...
- bzoj1052: [HAOI2007]覆盖问题(二分+构造)
貌似又写出了常数挺优(至少不劣)的代码>v< 930+人AC #49 写了个O(nlogn)貌似比一些人O(n)还快2333333 这题还是先二分答案,check比较麻烦 显然正方形一定以 ...