linux,input-type = <1>; linux,code = <KEY_VOLUMEUP>; linux,can-disable; debounce-interval = <15>; gpio-key,wakeup; }; userkey1 { label ="userkey1"; gpios = <&tlmm107GPIO_ACTIVE_HIGH>; linux,input-type = <1>; linux,code = <KEY_F22>; linux,can-disable; debounce-interval ...
code=<KEY_F13>;label="GPIO F13 Power";linux,input-type=<1>;gpio-key,wakeup=<1>;debounce-interval=<100>;};button@1 {gpios=<&pio 48 IRQ_TYPE_EDGE_BOTH>;linux,code=<KEY_F14>
linux,code = <KEY_F14>; label = "GPIO F14 Power"; linux,input-type = <1>; gpio-key,wakeup = <1>; debounce-interval = <100>; }; button@2 { gpios = <&pio 51 IRQ_TYPE_EDGE_BOTH>; linux,code = <KEY_F15>; label = "GPIO F15 Power"; linux,input-type = <1>; gpio-key...
[gpio-keys/up]linux,code =103linux,input-type =1gpios = port:PH11<6><default><default><default>[gpio-keys/down]linux,code =108linux,input-type =1gpios = port:PH08<0><default><default><default>[gpio-keys/enter]linux,code =28linux,input-type =1gpios = port:PH10<6><default><...
- linux,code: Keycode to emit. Note that either "interrupts" or "gpios" properties can be omitted, but not both at the same time. Specifying both properties is allowed. 我们可以使用gpios属性,描述我们需要使用的GPIO管脚,或者使用interrupts属性,来描述按键对应的GPIO管脚,此时驱动代码使用中断形式触发...
linux,default-trigger = "none"; }; ... keypad { compatible = "gpio-keys"; #address-cells = <1>; #size-cells = <0>; autorepeat; sw1 { label = "sw1"; gpios = <&pl7_gpio_buttons 0 0>; linux,code = <0x100>; /* up */ ...
gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_pmic>; // nPBOUT Line Input power_button_npbout { label = "nPBOUT"; gpios = <&gpio2 18 GPIO_ACTIVE_LOW>; linux,code = <KEY_RESTART>; debounce-interval = <0>; //i...
gpio-keys { compatible = "gpio-keys"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio_pmic>; // nPBOUT Line Input power_button_npbout { label = "nPBOUT"; gpios = <&gpio2 18 GPIO_ACTIVE_LOW>; linux,code = <KEY_RESTART>; debounce-interval = <0>; //interrupt-pa...
#include <linux/sched.h> #include <linux/pm.h> #include <linux/slab.h> #include <linux/sysctl.h> #include <linux/proc_fs.h> #include <linux/delay.h> #include <linux/platform_device.h> #include <linux/input.h> #include <linux/gpio_keys.h> ...
CONFIG_KEYBOARD_GPIO=y CONFIG_SERIO_LIBPS2=y CONFIG_INPUT_EVBUG=m and our DTS file to include: gpio-keys { compatible = "gpio-keys"; switch1 { label = "Switch 1"; gpio = <&gpio1 12 0>; linux,code = <89>; /* Unmapped keycode */ ...