您尚未登录。

楼主 # 2021-06-02 20:03:06

TeveT
会员
注册时间: 2019-07-01
已发帖子: 149
积分: 92

S3/V3S芯片跑Tina 3.5版本的gpio_keys使用

如题,分享一下

sun8iw8p1-pinctrl.dtsi 添加:

			key_pins: key_pins@0 {
				allwinner,pins= "PB12";
				allwinner,function = "gpio_in";
				allwinner,muxsel = <0>;
				allwinner,drive = <1>;
				allwinner,pull = <1>;
			};	

board.dts 添加:

gpio_keys {
	compatible = "gpio-keys";
	pinctrl-names = "default";
	pinctrl-0 = <&key_pins>;
	
	autorepeat;
	button@1 {
			label = "Key home";
			linux,code =  <158>;
			gpios =  <&pio 1 12 6 1 1 1>;
			gpio-key,wakeup;
			//interrupt-parent = <&pio>;
			//interrupts = <1 12 IRQ_TYPE_EDGE_FALLING>; //PB12			
	};
};

好,接着奏乐,接着舞……

离线

页脚

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

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