In imx6q-sabresd board,the devicetree has configured the gpio-keys as follow:
gpio-keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_keys>;
power {
label = "Power Button";
gpios = <&gpio3 29 1>;
gpio-key,wakeup;
linux,code = <KEY_POWER>;
};
volume-up {
label = "Volume Up";
gpios = <&gpio1 4 1>;
gpio-key,wakeup;
linux,code = <KEY_VOLUMEUP>;
};
volume-down {
label = "Volume Down";
gpios = <&gpio1 5 1>;
gpio-key,wakeup;
linux,code = <KEY_VOLUMEDOWN>;
};
};
but when I pressed the button,nothing appeared, anyone knows how to use the gpio-key to contorl volume?