59.使用设备树描述中断

查看底板触摸屏的原理找到中断gpio

编写设备树

cpp 复制代码
/dts-v1/;

/include/ "dt-bindings/pinctrl/rockchip.h"
/include/ "dt-bindings/interrupt-controller/irq.h"

/ {
    model = "this is my test devicetree!";
    ft5x06@38 {
        compatible = "edt,edt-ft5206";
        interrupt-parent = <&gpio0>;
        interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
    };
};

compatible对应drivers/input/touchscreen/edt-ft5x06.c

gpio0对应arch/arm64/boot/dts/rockchip/rk356x-base.dtsi

RK_PB5对应include/dt-bindings/pinctrl/rockchip.h

IRQ_TYPE_EDGE_FALLING对应include/dt-bindings/interrupt-controller/irq.h

相关推荐
海盗123429 分钟前
微软技术日报 2026-10-01:VS Code 1.140 让模型互相挑错,EWS 今天起关停
人工智能·驱动开发·microsoft·机器人·aigc
铅笔小新z1 小时前
【stm32】SPI Flash 驱动开发
驱动开发·stm32·嵌入式硬件
夜听莺儿鸣10 小时前
502-002_Linux驱动开发模块化编程
linux·驱动开发·模块化编程
wixzjsh18 小时前
i.MX6ULL LCD 驱动开发实战:从引脚到时钟的完整配置
驱动开发
路溪非溪1 天前
Linux中环境变量的问题总结
linux·运维·开发语言·驱动开发
2401_862880822 天前
LCD 显示与触控屏驱动开发
驱动开发·嵌入式硬件
Doraemomo2 天前
Linux内核驱动开发——中断与定时器
linux·运维·驱动开发
@嵌入式扫地僧3 天前
ECC 编程智能体嵌入式适配实战:ESP32/RK3588 驱动开发提效 60%+ 指南
驱动开发·嵌入式开发·代码优化·ai辅助开发·编程智能体
EatFan3 天前
GitHub Trending 三连观察:AI 编码智能体进入“周边生态”竞争阶段
人工智能·驱动开发·github·mcp·superpowers·github trending·spec kit
sukalot3 天前
Windows 驱动实例分析系列:libwdi 驱动分析 - examples 篇(三)
windows·驱动开发