diff mbox series

[v4,5/8] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button

Message ID 20211120214227.779742-6-danct12@riseup.net (mailing list archive)
State Changes Requested
Headers show
Series Improve support for Xiaomi Redmi Note 7 | expand

Commit Message

Dang Huynh Nov. 20, 2021, 9:42 p.m. UTC
This enables the volume up key.

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

Comments

Caleb Connolly Nov. 20, 2021, 9:51 p.m. UTC | #1
On 20/11/2021 21:42, Dang Huynh wrote:
> This enables the volume up key.
>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
>   .../arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> index 9a6684922804..c7bdf4c28be4 100644
> --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> @@ -9,6 +9,8 @@
>   #include "sdm660.dtsi"
>   #include "pm660.dtsi"
>   #include "pm660l.dtsi"
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/input/gpio-keys.h>
>
>   / {
>   	model = "Xiaomi Redmi Note 7";
> @@ -33,6 +35,18 @@ vph_pwr: vph-pwr-regulator {
>   		regulator-boot-on;
>   	};
>
> +	gpio-keys {
> +		compatible = "gpio-keys";
> +		input-name = "gpio-keys";
I don't think input-name is used anymore.
> +
> +		volup {
> +			label = "Volume Up";
> +			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
> +			linux,code = <KEY_VOLUMEUP>;
> +			debounce-interval = <15>;
> +		};
> +	};
> +
>   	reserved-memory {
>   		#address-cells = <2>;
>   		#size-cells = <2>;
> --
> 2.33.1
>

--
Kind Regards,
Caleb
Bjorn Andersson Nov. 20, 2021, 11:57 p.m. UTC | #2
On Sat 20 Nov 15:51 CST 2021, Caleb Connolly wrote:

> 
> 
> On 20/11/2021 21:42, Dang Huynh wrote:
> > This enables the volume up key.
> >
> > Signed-off-by: Dang Huynh <danct12@riseup.net>
> > ---
> >   .../arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts | 14 ++++++++++++++
> >   1 file changed, 14 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> > index 9a6684922804..c7bdf4c28be4 100644
> > --- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> > +++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
> > @@ -9,6 +9,8 @@
> >   #include "sdm660.dtsi"
> >   #include "pm660.dtsi"
> >   #include "pm660l.dtsi"
> > +#include <dt-bindings/input/input.h>
> > +#include <dt-bindings/input/gpio-keys.h>
> >
> >   / {
> >   	model = "Xiaomi Redmi Note 7";
> > @@ -33,6 +35,18 @@ vph_pwr: vph-pwr-regulator {
> >   		regulator-boot-on;
> >   	};
> >
> > +	gpio-keys {
> > +		compatible = "gpio-keys";
> > +		input-name = "gpio-keys";
> I don't think input-name is used anymore.

It seems you're correct, we have it in a number of dts files, but I
don't see it in the binding document or the Linux implementation.

I've applied the rest of the patches in the series for now.

Thanks,
Bjorn

> > +
> > +		volup {
> > +			label = "Volume Up";
> > +			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
> > +			linux,code = <KEY_VOLUMEUP>;
> > +			debounce-interval = <15>;
> > +		};
> > +	};
> > +
> >   	reserved-memory {
> >   		#address-cells = <2>;
> >   		#size-cells = <2>;
> > --
> > 2.33.1
> >
> 
> --
> Kind Regards,
> Caleb
>
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 9a6684922804..c7bdf4c28be4 100644
--- a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
+++ b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts
@@ -9,6 +9,8 @@ 
 #include "sdm660.dtsi"
 #include "pm660.dtsi"
 #include "pm660l.dtsi"
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/gpio-keys.h>
 
 / {
 	model = "Xiaomi Redmi Note 7";
@@ -33,6 +35,18 @@  vph_pwr: vph-pwr-regulator {
 		regulator-boot-on;
 	};
 
+	gpio-keys {
+		compatible = "gpio-keys";
+		input-name = "gpio-keys";
+
+		volup {
+			label = "Volume Up";
+			gpios = <&pm660l_gpios 7 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_VOLUMEUP>;
+			debounce-interval = <15>;
+		};
+	};
+
 	reserved-memory {
 		#address-cells = <2>;
 		#size-cells = <2>;