AnsweredAssumed Answered

How to use gpio-key to control volume

Question asked by jingyang xie on May 30, 2017
Latest reply on Jun 19, 2017 by igorpadykov

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?

Outcomes