dts: add missing linux,code in gpio-keys
gpio-keys linux driver enforces user to specify linux,code. Add missing linux,code before implementing button input support. - arch/arm/dts/rk3288-popmetal.dtsi -> KEY_POWER - arch/arm/dts/rk3288-tinker.dtsi -> KEY_POWER - arch/arm/dts/am3517-evm-ui.dtsi -> KEY_RECORD - sandbox/dts/sandbox.dtsi -> BTN_1 - sandbox/dts/sandbox.dts -> BTN_1 Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
42a0c908dd
commit
2ea062265f
5 changed files with 10 additions and 2 deletions
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
record {
|
record {
|
||||||
label = "Record";
|
label = "Record";
|
||||||
/* linux,code = <BTN_0>; */
|
linux,code = <KEY_RECORD>;
|
||||||
gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
|
gpios = <&tca6416_2 15 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
gpio_keys: gpio-keys {
|
gpio_keys: gpio-keys {
|
||||||
compatible = "gpio-key";
|
compatible = "gpio-keys";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_gpio_keys>;
|
pinctrl-0 = <&pinctrl_gpio_keys>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
#include "rk3288.dtsi"
|
#include "rk3288.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -63,6 +64,7 @@
|
||||||
power {
|
power {
|
||||||
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||||
label = "GPIO Key Power";
|
label = "GPIO Key Power";
|
||||||
|
linux,code = <KEY_POWER>;
|
||||||
linux,input-type = <1>;
|
linux,input-type = <1>;
|
||||||
wakeup-source;
|
wakeup-source;
|
||||||
debounce-interval = <100>;
|
debounce-interval = <100>;
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
* OTHER DEALINGS IN THE SOFTWARE.
|
* OTHER DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
#include "rk3288.dtsi"
|
#include "rk3288.dtsi"
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -63,6 +64,7 @@
|
||||||
button@0 {
|
button@0 {
|
||||||
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
|
||||||
label = "GPIO Key Power";
|
label = "GPIO Key Power";
|
||||||
|
linux,code = <KEY_POWER>;
|
||||||
linux,input-type = <1>;
|
linux,input-type = <1>;
|
||||||
gpio-key,wakeup = <1>;
|
gpio-key,wakeup = <1>;
|
||||||
debounce-interval = <100>;
|
debounce-interval = <100>;
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
* and sandbox64 builds.
|
* and sandbox64 builds.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
#define USB_CLASS_HUB 9
|
#define USB_CLASS_HUB 9
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
|
@ -36,11 +38,13 @@
|
||||||
btn1 {
|
btn1 {
|
||||||
gpios = <&gpio_a 3 0>;
|
gpios = <&gpio_a 3 0>;
|
||||||
label = "button1";
|
label = "button1";
|
||||||
|
linux,code = <BTN_1>;
|
||||||
};
|
};
|
||||||
|
|
||||||
btn2 {
|
btn2 {
|
||||||
gpios = <&gpio_a 4 0>;
|
gpios = <&gpio_a 4 0>;
|
||||||
label = "button2";
|
label = "button2";
|
||||||
|
linux,code = <BTN_2>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue