您尚未登录。

楼主 #1 2019-08-27 11:39:32

阿黄
会员
注册时间: 2018-10-03
已发帖子: 299
积分: 134

请教F1C100S的GPIO中断问题

我驱动DM9051NP的时候,需要用到INT引脚(PE2,下降沿中断),想在设备树中进行描述该中断。
参考了 https://whycan.cn/t_2393.htmlhttps://whycan.cn/t_1261.html
设备树中这样写不知道对不对,
<code>
&spi1 {
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins_a>;
status = "okay";
spi-max-frequency = <25000000>;

dm9051@0 {
compatible = "davicom,dm9051";
reg = <0>;
spi-max-frequency = <25000000>;/<109000000>;/
status = "okay";

autorepeat;
dm9051_int {
label = "DM9051 INT IRQ";
linux,code = <DM9051 INT>;
interrupt-parent = <&pio>;
interrupts = <4 2 IRQ_TYPE_EDGE_FALLING> / pe2 /
};
};
};
</code>

驱动中应该是使用platform_get_irq 还是of_xxx进行获取中断号呢?

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn


东莞哇酷科技有限公司开发