Re: [PATCH] arm64: dts: qcom: sm6125-seine: Clean up gpio-keys (volume down)

From: Konrad Dybcio
Date: Sat Dec 17 2022 - 10:04:27 EST




On 17.12.2022 11:04, Marijn Suijten wrote:
> - Remove autorepeat (leave key repetition to userspace);
> - Remove unneeded status = "okay" (this is the default);
> - Allow the interrupt line for this button to be disabled;
> - Use a full, descriptive node name;
> - Set proper bias on the GPIO via pinctrl;
> - Sort properties.
>
> Fixes: 82e1783890b7 ("arm64: dts: qcom: sm6125: Add support for Sony Xperia 10II")
> Signed-off-by: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>
> ---
> .../qcom/sm6125-sony-xperia-seine-pdx201.dts | 20 ++++++++++++++-----
> 1 file changed, 15 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts b/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
> index 1b9e40d3d269..8c7c9331fd21 100644
> --- a/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
> +++ b/arch/arm64/boot/dts/qcom/sm6125-sony-xperia-seine-pdx201.dts
> @@ -41,17 +41,17 @@ extcon_usb: extcon-usb {
> };
>
> gpio-keys {
> - status = "okay";
> compatible = "gpio-keys";
> - autorepeat;
> + pinctrl-0 = <&gpio_keys_state>;
> + pinctrl-names = "default";
>
> - key-vol-dn {
> + key-volume-down {
> label = "Volume Down";
> gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
> - linux,input-type = <1>;
> linux,code = <KEY_VOLUMEDOWN>;
> - gpio-key,wakeup;
> debounce-interval = <15>;
> + linux,can-disable;
> + gpio-key,wakeup;
> };
> };
>
> @@ -270,6 +270,16 @@ &sdhc_1 {
>
> &tlmm {
> gpio-reserved-ranges = <22 2>, <28 6>;
> +
> + gpio_keys_state: gpio-keys-state {
> + key-volume-down-pins {
I see no need for defining a wrapper node.
The other changes look good!

Konrad
> + pins = "gpio47";
> + function = "gpio";
> + drive-strength = <2>;
> + bias-disable;
> + input-enable;
> + };
> + };
> };
>
> &usb3 {