2021-09-16 13:24:17

by Satya Priya

[permalink] [raw]
Subject: [PATCH V5 0/2] Add Vol+ support for sc7280-idp

David Collins (1):
pinctrl: qcom: spmi-gpio: correct parent irqspec translation

satya priya (1):
arm64: dts: sc7280: Add volume up support for sc7280-idp

arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 31 ++++++++++++++++++++++++++
drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 37 +++++++++++++++++++++++++++++---
2 files changed, 65 insertions(+), 3 deletions(-)

--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation


2021-09-16 14:34:31

by Satya Priya

[permalink] [raw]
Subject: [PATCH V5 2/2] arm64: dts: sc7280: Add volume up support for sc7280-idp

From: satya priya <[email protected]>

Add pm7325 PMIC gpio support for vol+ on sc7280-idp.

Signed-off-by: satya priya <[email protected]>
---
Changes in V2:
- No changes.

Changes in V3:
- Sorted the nodes alphabetically.

Changes in V4:
- Updated the node names to replace underscores with hipens

Changes in V5:
- Moved the gpio-keys node under root node.

arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index 371a2a9..cbbb0ee 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -12,6 +12,26 @@
#include "pm8350c.dtsi"
#include "pmk8350.dtsi"

+/ {
+ gpio-keys {
+ compatible = "gpio-keys";
+ label = "gpio-keys";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&key_vol_up_default>;
+
+ volume-up {
+ label = "volume_up";
+ gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
+ linux,input-type = <1>;
+ linux,code = <KEY_VOLUMEUP>;
+ gpio-key,wakeup;
+ debounce-interval = <15>;
+ linux,can-disable;
+ };
+ };
+};
+
&apps_rsc {
pm7325-regulators {
compatible = "qcom,pm7325-rpmh-regulators";
@@ -284,6 +304,17 @@

/* PINCTRL - additions to nodes defined in sc7280.dtsi */

+&pm7325_gpios {
+ key_vol_up_default: key-vol-up-default {
+ pins = "gpio6";
+ function = "normal";
+ input-enable;
+ bias-pull-up;
+ power-source = <0>;
+ qcom,drive-strength = <3>;
+ };
+};
+
&qup_uart5_default {
tx {
pins = "gpio46";
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

2021-09-17 08:34:49

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH V5 2/2] arm64: dts: sc7280: Add volume up support for sc7280-idp

Quoting Satya Priya (2021-09-16 06:21:38)
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> index 371a2a9..cbbb0ee 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> @@ -12,6 +12,26 @@
> #include "pm8350c.dtsi"
> #include "pmk8350.dtsi"
>
> +/ {
> + gpio-keys {
> + compatible = "gpio-keys";
> + label = "gpio-keys";
> +
> + pinctrl-names = "default";
> + pinctrl-0 = <&key_vol_up_default>;
> +
> + volume-up {
> + label = "volume_up";
> + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
> + linux,input-type = <1>;
> + linux,code = <KEY_VOLUMEUP>;

Is there an include for this define? Looks like
<dt-bindings/input/input.h> should be added as well? Did you try
compiling?

> + gpio-key,wakeup;
> + debounce-interval = <15>;
> + linux,can-disable;
> + };
> + };
> +};
> +
> &apps_rsc {
> pm7325-regulators {
> compatible = "qcom,pm7325-rpmh-regulators";
> @@ -284,6 +304,17 @@
>
> /* PINCTRL - additions to nodes defined in sc7280.dtsi */
>
> +&pm7325_gpios {
> + key_vol_up_default: key-vol-up-default {
> + pins = "gpio6";
> + function = "normal";
> + input-enable;
> + bias-pull-up;
> + power-source = <0>;
> + qcom,drive-strength = <3>;
> + };
> +};
> +
> &qup_uart5_default {
> tx {
> pins = "gpio46";
> --
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation
>

2021-09-17 16:05:54

by Satya Priya

[permalink] [raw]
Subject: Re: [PATCH V5 2/2] arm64: dts: sc7280: Add volume up support for sc7280-idp

On 2021-09-17 00:32, Stephen Boyd wrote:
> Quoting Satya Priya (2021-09-16 06:21:38)
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> index 371a2a9..cbbb0ee 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
>> @@ -12,6 +12,26 @@
>> #include "pm8350c.dtsi"
>> #include "pmk8350.dtsi"
>>
>> +/ {
>> + gpio-keys {
>> + compatible = "gpio-keys";
>> + label = "gpio-keys";
>> +
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&key_vol_up_default>;
>> +
>> + volume-up {
>> + label = "volume_up";
>> + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
>> + linux,input-type = <1>;
>> + linux,code = <KEY_VOLUMEUP>;
>
> Is there an include for this define? Looks like
> <dt-bindings/input/input.h> should be added as well? Did you try
> compiling?
>

Yeah, it needs <dt-bindings/input/linux-event-codes.h> to be included.
This header was included in pmk8350.dtsi which is added in this file.

>> + gpio-key,wakeup;
>> + debounce-interval = <15>;
>> + linux,can-disable;
>> + };
>> + };
>> +};
>> +
>> &apps_rsc {
>> pm7325-regulators {
>> compatible = "qcom,pm7325-rpmh-regulators";
>> @@ -284,6 +304,17 @@
>>
>> /* PINCTRL - additions to nodes defined in sc7280.dtsi */
>>
>> +&pm7325_gpios {
>> + key_vol_up_default: key-vol-up-default {
>> + pins = "gpio6";
>> + function = "normal";
>> + input-enable;
>> + bias-pull-up;
>> + power-source = <0>;
>> + qcom,drive-strength = <3>;
>> + };
>> +};
>> +
>> &qup_uart5_default {
>> tx {
>> pins = "gpio46";
>> --
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
>> member
>> of Code Aurora Forum, hosted by The Linux Foundation
>>

2021-09-17 16:16:39

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH V5 2/2] arm64: dts: sc7280: Add volume up support for sc7280-idp

Quoting [email protected] (2021-09-16 21:08:11)
> On 2021-09-17 00:32, Stephen Boyd wrote:
> > Quoting Satya Priya (2021-09-16 06:21:38)
> >> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> >> b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> >> index 371a2a9..cbbb0ee 100644
> >> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> >> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> >> @@ -12,6 +12,26 @@
> >> #include "pm8350c.dtsi"
> >> #include "pmk8350.dtsi"
> >>
> >> +/ {
> >> + gpio-keys {
> >> + compatible = "gpio-keys";
> >> + label = "gpio-keys";
> >> +
> >> + pinctrl-names = "default";
> >> + pinctrl-0 = <&key_vol_up_default>;
> >> +
> >> + volume-up {
> >> + label = "volume_up";
> >> + gpios = <&pm7325_gpios 6 GPIO_ACTIVE_LOW>;
> >> + linux,input-type = <1>;
> >> + linux,code = <KEY_VOLUMEUP>;
> >
> > Is there an include for this define? Looks like
> > <dt-bindings/input/input.h> should be added as well? Did you try
> > compiling?
> >
>
> Yeah, it needs <dt-bindings/input/linux-event-codes.h> to be included.
> This header was included in pmk8350.dtsi which is added in this file.

Alright, got it. If you can include this header in this dts file it
would be better so we don't rely on implicit includes from other files
to get macros. With that change you can add my

Reviewed-by: Stephen Boyd <[email protected]>