diff mbox series

[4/7] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button

Message ID 20211107195511.3346734-5-danct12@riseup.net (mailing list archive)
State Superseded
Headers show
Series Improve support for Xiaomi Redmi Note 7 | expand

Commit Message

Dang Huynh Nov. 7, 2021, 7:55 p.m. UTC
This enables the volume up key.

Signed-off-by: Dang Huynh <danct12@riseup.net>
---
 .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Martin Botka Nov. 7, 2021, 9:58 p.m. UTC | #1
Reviewed-by: Martin Botka <martin.botka@somainline.org>

On Mon, Nov 8 2021 at 02:55:08 AM +0700, Dang Huynh 
<danct12@riseup.net> wrote:
> This enables the volume up key.
> 
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>  .../boot/dts/qcom/sdm660-xiaomi-lavender.dts  | 20 
> +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts 
> b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> index 28408240735b..5e4682f54fbe 100644
> --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> @@ -9,6 +9,9 @@
>  #include "sdm660.dtsi"
>  #include "pm660.dtsi"
>  #include "pm660l.dtsi"
> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/input/gpio-keys.h>
> 
>  / {
>  	model = "Xiaomi Redmi Note 7";
> @@ -31,6 +34,23 @@ vph_pwr: vph-pwr-regulator {
>  		regulator-boot-on;
>  	};
> 
> +	gpio_keys {
> +		status = "okay";
> +		compatible = "gpio-keys";
> +		input-name = "gpio-keys";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		vol_up {
> +			label = "Volume Up";
> +			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
> +			linux,input-type = <1>;
> +			linux,code = <KEY_VOLUMEUP>;
> +			gpio-key,wakeup;
> +			debounce-interval = <15>;
> +		};
> +	};
> +
>  	reserved-memory {
>  		#address-cells = <2>;
>  		#size-cells = <2>;
> --
> 2.33.1
>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
index 28408240735b..5e4682f54fbe 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -9,6 +9,9 @@ 
 #include "sdm660.dtsi"
 #include "pm660.dtsi"
 #include "pm660l.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/gpio-keys.h>
 
 / {
 	model = "Xiaomi Redmi Note 7";
@@ -31,6 +34,23 @@  vph_pwr: vph-pwr-regulator {
 		regulator-boot-on;
 	};
 
+	gpio_keys {
+		status = "okay";
+		compatible = "gpio-keys";
+		input-name = "gpio-keys";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vol_up {
+			label = "Volume Up";
+			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
+			linux,input-type = <1>;
+			linux,code = <KEY_VOLUMEUP>;
+			gpio-key,wakeup;
+			debounce-interval = <15>;
+		};
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;