Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: qcom: msm8960: expressatt: Add gpio-keys

Adds volume up, volume down, and home keys to expressatt

Signed-off-by: Rudraksha Gupta <guptarud@gmail.com>
Link: https://lore.kernel.org/r/20240120-expressatt-gpio-keys-v1-1-4da7e37440b1@gmail.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>

authored by

Rudraksha Gupta and committed by
Bjorn Andersson
8d909805 be8db0cd

+40
+40
arch/arm/boot/dts/qcom/qcom-msm8960-samsung-expressatt.dts
··· 4 4 5 5 #include "qcom-msm8960.dtsi" 6 6 #include "pm8921.dtsi" 7 + #include <dt-bindings/gpio/gpio.h> 8 + #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> 9 + #include <dt-bindings/input/gpio-keys.h> 7 10 8 11 / { 9 12 model = "Samsung Galaxy Express SGH-I437"; ··· 21 18 22 19 chosen { 23 20 stdout-path = "serial0:115200n8"; 21 + }; 22 + 23 + gpio-keys { 24 + compatible = "gpio-keys"; 25 + 26 + pinctrl-names = "default"; 27 + pinctrl-0 = <&gpio_keys_pin_a>; 28 + 29 + key-home { 30 + label = "Home"; 31 + gpios = <&msmgpio 40 GPIO_ACTIVE_LOW>; 32 + debounce-interval = <5>; 33 + linux,code = <KEY_HOMEPAGE>; 34 + wakeup-event-action = <EV_ACT_ASSERTED>; 35 + wakeup-source; 36 + }; 37 + 38 + key-volume-up { 39 + label = "Volume Up"; 40 + gpios = <&msmgpio 50 GPIO_ACTIVE_LOW>; 41 + debounce-interval = <5>; 42 + linux,code = <KEY_VOLUMEUP>; 43 + }; 44 + 45 + key-volume-down { 46 + label = "Volume Down"; 47 + gpios = <&msmgpio 81 GPIO_ACTIVE_LOW>; 48 + debounce-interval = <5>; 49 + linux,code = <KEY_VOLUMEDOWN>; 50 + }; 24 51 }; 25 52 }; 26 53 ··· 115 82 drive-strength = <12>; 116 83 bias-disable; 117 84 }; 85 + }; 86 + 87 + gpio_keys_pin_a: gpio-keys-active-state { 88 + pins = "gpio40", "gpio50", "gpio81"; 89 + function = "gpio"; 90 + drive-strength = <8>; 91 + bias-disable; 118 92 }; 119 93 }; 120 94