Message ID | 20211111031635.3839947-6-danct12@riseup.net (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Improve support for Xiaomi Redmi Note 7 | expand |
On 11.11.2021 04:16, Dang Huynh wrote: > This enables the volume up key. > > Reviewed-by: Caleb Connolly <caleb@connolly.tech> > Reviewed-by: Martin Botka <martin.botka@somainline.org> > Reviewed-by: Konrad Dybcio <konradybcio@gmail.com> Drop. > Signed-off-by: Dang Huynh <danct12@riseup.net> > --- > .../boot/dts/qcom/sdm660-xiaomi-lavender.dts | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts > index 729b71407c36..456562cb6028 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> gpio.h can safely be moved to the SoC DTSI. Konrad
diff --git a/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts b/arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dts index 729b71407c36..456562cb6028 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"; @@ -33,6 +36,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>;