[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20221222190341.3fczhaqumiudqeie@SoMainline.org>
Date: Thu, 22 Dec 2022 20:03:41 +0100
From: Marijn Suijten <marijn.suijten@...ainline.org>
To: Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: linux-arm-msm@...r.kernel.org, andersson@...nel.org,
agross@...nel.org, krzysztof.kozlowski@...aro.org,
Vinod Koul <vkoul@...nel.org>,
Konrad Dybcio <konrad.dybcio@...ainline.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/7] arm64: dts: qcom: sm8450-nagara: Add GPIO keys
On 2022-12-13 20:10:33, Konrad Dybcio wrote:
> With PMIC GPIOs now available, set up required pin settings and add
> gpio-keys.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@...aro.org>
> ---
> .../dts/qcom/sm8450-sony-xperia-nagara.dtsi | 61 +++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi
> index 8e128efcb128..3d96b6757aa3 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450-sony-xperia-nagara.dtsi
> @@ -27,6 +27,41 @@ chosen {
> stdout-path = "serial0:115200n8";
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> + label = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&focus_n &snapshot_n &vol_down_n>;
> +
> + key-camera-focus {
> + label = "Camera Focus";
> + linux,code = <KEY_CAMERA_FOCUS>;
> + gpios = <&pm8350b_gpios 8 GPIO_ACTIVE_LOW>;
> + debounce-interval = <15>;
> + linux,can-disable;
> + gpio-key,wakeup;
Let's use wakeup-source instead of this deprecated property to appease
the DT bindings.
- Marijn
> + };
> +
> + key-camera-snapshot {
> + label = "Camera Snapshot";
> + linux,code = <KEY_CAMERA>;
> + gpios = <&pm8350b_gpios 5 GPIO_ACTIVE_LOW>;
> + debounce-interval = <15>;
> + linux,can-disable;
> + gpio-key,wakeup;
> + };
> +
> + key-volume-down {
> + label = "Volume Down";
> + linux,code = <KEY_VOLUMEDOWN>;
> + gpios = <&pm8350_gpios 6 GPIO_ACTIVE_LOW>;
> + debounce-interval = <15>;
> + linux,can-disable;
> + gpio-key,wakeup;
> + };
> + };
> +
> reserved-memory {
> adsp_mem: memory@...00000 {
> reg = <0x0 0x85700000 0x0 0x2800000>;
> @@ -562,6 +597,32 @@ &pm8350_gpios {
> "NC",
> "NC",
> "PM8350_OPTION"; /* GPIO_10 */
> +
> + vol_down_n: vol-down-n-state {
> + pins = "gpio6";
> + function = "normal";
> + power-source = <1>;
> + bias-pull-up;
> + input-enable;
> + };
> +};
> +
> +&pm8350b_gpios {
> + snapshot_n: snapshot-n-state {
> + pins = "gpio5";
> + function = "normal";
> + power-source = <0>;
> + bias-pull-up;
> + input-enable;
> + };
> +
> + focus_n: focus-n-state {
> + pins = "gpio8";
> + function = "normal";
> + power-source = <0>;
> + bias-pull-up;
> + input-enable;
> + };
> };
>
> &pm8450_gpios {
> --
> 2.39.0
>
Powered by blists - more mailing lists