lkml.org 
[lkml]   [2021]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 4/7] arm64: dts: qcom: sdm660-xiaomi-lavender: Add volume up button
From

On 08/11/2021 06:03, Dang Huynh wrote:
> This enables the volume up key.
>
> Reviewed-by: Caleb Connolly <caleb@connolly.tech>
> Reviewed-by: Martin Botka <martin.botka@somainline.org>
> Signed-off-by: Dang Huynh <danct12@riseup.net>
> ---
> .../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 18 ++++++++++++++++++
> 1 file changed, 18 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..ab814dc8a875 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,21 @@ vph_pwr: vph-pwr-regulator {
> regulator-boot-on;
> };
>
> + gpio_keys {

Nodes shouldn't use underscores.


> + status = "okay";

It's set to "okay" by default, no need for this line.


> + compatible = "gpio-keys";
> + input-name = "gpio-keys";
> + #address-cells = <1>;
> + #size-cells = <0>;

Not sure if you need -cells here, as the child nodes don't have a reg.


> +
> + vol_up {

Ditto


> + 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>;
>
Konrad

\
 
 \ /
  Last update: 2021-11-08 13:55    [W:0.076 / U:0.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site