lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <i6rvfbq4dl2qqjgm2k6ofkbbj5gugpj6jxpgacxawgcmhg2vp3@xux66b3lqfvb>
Date:   Wed, 14 Jun 2023 14:27:02 +0200
From:   Marijn Suijten <marijn.suijten@...ainline.org>
To:     Konrad Dybcio <konrad.dybcio@...aro.org>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Konrad Dybcio <konrad.dybcio@...ainline.org>
Subject: Re: [PATCH 4/4] arm64: dts: qcom: sm8250-edo: Rectify gpio-keys

On 2023-06-14 14:11:49, Konrad Dybcio wrote:
> Set up the corresponding GPIOs properly and add the leftover hardware
> buttons to mark this piece of the puzzle complete.
> 
> Fixes: 69cdb97ef652 ("arm64: dts: qcom: sm8250: Add support for SONY Xperia 1 II / 5 II (Edo platform)")

This commit did not add any keys, did you mean:

Fixes: 46e14907c716 ("arm64: dts: qcom: sm8250-edo: Add hardware keys")

> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>

The patch itself has been working fine on both devices for a very long
time:

Reviewed-by: Marijn Suijten <marijn.suijten@...ainline.org>

> ---
>  .../dts/qcom/sm8250-sony-xperia-edo-pdx206.dts     | 10 ++++
>  .../boot/dts/qcom/sm8250-sony-xperia-edo.dtsi      | 54 +++++++++++++++++++---
>  2 files changed, 58 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
> index ea4571bf4fbf..58a521046f5f 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
> +++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo-pdx206.dts
> @@ -20,6 +20,8 @@ &framebuffer {
>  };
>  
>  &gpio_keys {
> +	pinctrl-0 = <&focus_n &snapshot_n &vol_down_n &g_assist_n>;
> +
>  	g-assist-key {
>  		label = "Google Assistant Key";
>  		linux,code = <KEY_LEFTMETA>;
> @@ -48,6 +50,14 @@ &pm8150_gpios {
>  			  "SP_ARI_PWR_ALARM",
>  			  "NC",
>  			  "NC"; /* GPIO_10 */
> +
> +	g_assist_n: g-assist-n-state {
> +		pins = "gpio6";
> +		function = "normal";
> +		power-source = <1>;
> +		bias-pull-up;
> +		input-enable;
> +	};
>  };
>  
>  &pm8150b_gpios {
> diff --git a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
> index 9f9e7e9784fe..e55a94e5ff08 100644
> --- a/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8250-sony-xperia-edo.dtsi
> @@ -50,12 +50,26 @@ framebuffer: framebuffer@...00000 {
>  	gpio_keys: gpio-keys {
>  		compatible = "gpio-keys";
>  
> -		/*
> -		 * Camera focus (light press) and camera snapshot (full press)
> -		 * seem not to work properly.. Adding the former one stalls the CPU
> -		 * and the latter kills the volume down key for whatever reason. In any
> -		 * case, they are both on &pm8150b_gpios: camera focus(2), camera snapshot(1).
> -		 */
> +		pinctrl-0 = <&focus_n &snapshot_n &vol_down_n>;
> +		pinctrl-names = "default";
> +
> +		key-camera-focus {
> +			label = "Camera Focus";
> +			linux,code = <KEY_CAMERA_FOCUS>;
> +			gpios = <&pm8150b_gpios 2 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <15>;
> +			linux,can-disable;
> +			gpio-key,wakeup;
> +		};
> +
> +		key-camera-snapshot {
> +			label = "Camera Snapshot";
> +			linux,code = <KEY_CAMERA>;
> +			gpios = <&pm8150b_gpios 1 GPIO_ACTIVE_LOW>;
> +			debounce-interval = <15>;
> +			linux,can-disable;
> +			gpio-key,wakeup;
> +		};
>  
>  		key-vol-down {
>  			label = "Volume Down";
> @@ -543,6 +557,34 @@ &pcie2_phy {
>  	vdda-pll-supply = <&vreg_l9a_1p2>;
>  };
>  
> +&pm8150_gpios {
> +	vol_down_n: vol-down-n-state {
> +		pins = "gpio1";
> +		function = "normal";
> +		power-source = <0>;
> +		bias-pull-up;
> +		input-enable;
> +	};
> +};
> +
> +&pm8150b_gpios {
> +	snapshot_n: snapshot-n-state {
> +		pins = "gpio1";
> +		function = "normal";
> +		power-source = <0>;
> +		bias-pull-up;
> +		input-enable;
> +	};
> +
> +	focus_n: focus-n-state {
> +		pins = "gpio2";
> +		function = "normal";
> +		power-source = <0>;
> +		bias-pull-up;
> +		input-enable;
> +	};
> +};
> +
>  &pon_pwrkey {
>  	status = "okay";
>  };
> 
> -- 
> 2.41.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ