如题,分享一下
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
};
};
好,接着奏乐,接着舞……
离线