diff options
author | Luca Weiss <luca@z3ntu.xyz> | 2017-10-11 14:02:26 +0300 |
---|---|---|
committer | Andy Gross <andy.gross@linaro.org> | 2017-10-11 23:52:48 +0300 |
commit | a7adc50f0d1c9589234902fec5f27c4420dde200 (patch) | |
tree | 6d9905625b4be99661af5af6f59bfc2c39ba131c /arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | |
parent | 1548a21458bf7c5fc541c0785aa886602b27d5f5 (diff) | |
download | linux-a7adc50f0d1c9589234902fec5f27c4420dde200.tar.xz |
ARM: dts: msm8974-FP2: Introduce gpio-keys nodes
This introduces the gpio-keys nodes for keys of the FP2 and the
associated pinctrl state.
Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts')
-rw-r--r-- | arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts index 79a5aa8b856a..9332c6e9c535 100644 --- a/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +++ b/arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts @@ -1,6 +1,10 @@ #include "qcom-msm8974.dtsi" #include "qcom-pm8841.dtsi" #include "qcom-pm8941.dtsi" +#include <dt-bindings/gpio/gpio.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> + / { model = "Fairphone 2"; @@ -13,6 +17,38 @@ chosen { stdout-path = "serial0:115200n8"; }; + + gpio-keys { + compatible = "gpio-keys"; + input-name = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pin_a>; + + camera-snapshot { + label = "camera_snapshot"; + gpios = <&pm8941_gpios 1 GPIO_ACTIVE_LOW>; + linux,code = <KEY_CAMERA>; + wakeup-source; + debounce-interval = <15>; + }; + + volume-down { + label = "volume_down"; + gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEDOWN>; + wakeup-source; + debounce-interval = <15>; + }; + + volume-up { + label = "volume_up"; + gpios = <&pm8941_gpios 5 GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + wakeup-source; + debounce-interval = <15>; + }; + }; }; &soc { @@ -20,3 +56,17 @@ status = "ok"; }; }; + +&spmi_bus { + pm8941@0 { + gpios@c000 { + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio1", "gpio2", "gpio5"; + function = "normal"; + + bias-pull-up; + power-source = <PM8941_GPIO_S3>; + }; + }; + }; +}; |