【发布时间】:2014-06-23 01:39:57
【问题描述】:
我一直在学习 linux 设备树,并且我们一直在尝试开始移植一些旧代码以使用它们。我在使用 gpio 控制器节点时遇到了一点问题:
gpio1: gpio-controller@c00 {
#gpio-cells = <2>;
compatible = "cavium,octeon-3860-gpio";
reg = <0xc00 0x100>;
gpio-controller;
/* Interrupts are specified by two parts:
* 1) GPIO pin number (0..15)
* 2) Triggering (1 - edge rising
* 2 - edge falling
* 4 - level active high
* 8 - level active low)
*/
interrupt-controller;
interrupt-cells = <2>;
interrupts = <0 24>, <1 25>, <2 26>, <3 27>;
};
我正在尝试将某些 IRQ 映射到 GPIO 引脚,但是,它似乎只将第一个 IRQ 24 映射到 gpio 引脚 0。我查看了源代码,看起来不像尽管设备树绑定文本文件似乎暗示它会(devicetree/bindings/gpio/cavium-octeon-gpio.txt),但将永远交互“中断”。有谁知道我如何将一些中断映射到不同的 gpio 引脚?
【问题讨论】:
标签: linux linux-kernel linux-device-driver gpio device-tree