linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support
@ 2017-07-27  6:30 Vivek Gautam
  2017-07-27  6:30 ` [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios Vivek Gautam
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Vivek Gautam @ 2017-07-27  6:30 UTC (permalink / raw)
  To: bjorn.andersson, linus.walleij, robh+dt, andy.gross, linux-arm-msm
  Cc: rnayak, linux-gpio, devicetree, linux-kernel, linux-arm-kernel,
	Vivek Gautam

Update the bindings doc and driver for pmi8994-gpio devices.

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---

- Have been using this patch-set on db820c [1] for extcon with
  usb controller. The usb controller uses one of these gpios
  for usb-id/vbus detection.

[1] https://github.com/boddob/linux/tree/for-qcomlt/4.13rc2-merged

 Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 2 ++
 drivers/pinctrl/qcom/pinctrl-spmi-gpio.c                     | 1 +
 2 files changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
index 8d893a874634..74932318d41d 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
@@ -15,6 +15,7 @@ PMIC's from Qualcomm.
 		    "qcom,pm8921-gpio"
 		    "qcom,pm8941-gpio"
 		    "qcom,pm8994-gpio"
+		    "qcom,pmi8994-gpio"
 		    "qcom,pma8084-gpio"
 
 		    And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio"
@@ -84,6 +85,7 @@ to specify in a pin configuration subnode:
 		    gpio1-gpio44 for pm8921
 		    gpio1-gpio36 for pm8941
 		    gpio1-gpio22 for pm8994
+		    gpio1-gpio10 for pmi8994
 		    gpio1-gpio22 for pma8084
 
 - function:
diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
index 664b641fd776..bf0a6438424b 100644
--- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
@@ -799,6 +799,7 @@ static int pmic_gpio_remove(struct platform_device *pdev)
 	{ .compatible = "qcom,pm8916-gpio" },	/* 4 GPIO's */
 	{ .compatible = "qcom,pm8941-gpio" },	/* 36 GPIO's */
 	{ .compatible = "qcom,pm8994-gpio" },	/* 22 GPIO's */
+	{ .compatible = "qcom,pmi8994-gpio" },	/* 10 GPIO's */
 	{ .compatible = "qcom,pma8084-gpio" },	/* 22 GPIO's */
 	{ .compatible = "qcom,spmi-gpio" }, /* Generic */
 	{ },
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios
  2017-07-27  6:30 [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Vivek Gautam
@ 2017-07-27  6:30 ` Vivek Gautam
  2017-07-27 21:00   ` Stephen Boyd
  2017-07-27 21:02 ` [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Stephen Boyd
  2017-08-03 20:01 ` Rob Herring
  2 siblings, 1 reply; 6+ messages in thread
From: Vivek Gautam @ 2017-07-27  6:30 UTC (permalink / raw)
  To: bjorn.andersson, linus.walleij, robh+dt, andy.gross, linux-arm-msm
  Cc: rnayak, linux-gpio, devicetree, linux-kernel, linux-arm-kernel,
	Vivek Gautam

Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---
 arch/arm64/boot/dts/qcom/pmi8994.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
index d3879a4e8076..3b04ca63c31e 100644
--- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
@@ -8,6 +8,23 @@
 		reg = <0x2 SPMI_USID>;
 		#address-cells = <1>;
 		#size-cells = <0>;
+
+		pmi8994_gpios: gpios@c000 {
+			compatible = "qcom,pmi8994-gpio";
+			reg = <0xc000>;
+			gpio-controller;
+			#gpio-cells = <2>;
+			interrupts = <2 0xc0 0 IRQ_TYPE_NONE>,
+				     <2 0xc1 0 IRQ_TYPE_NONE>,
+				     <2 0xc2 0 IRQ_TYPE_NONE>,
+				     <2 0xc3 0 IRQ_TYPE_NONE>,
+				     <2 0xc4 0 IRQ_TYPE_NONE>,
+				     <2 0xc5 0 IRQ_TYPE_NONE>,
+				     <2 0xc6 0 IRQ_TYPE_NONE>,
+				     <2 0xc7 0 IRQ_TYPE_NONE>,
+				     <2 0xc8 0 IRQ_TYPE_NONE>,
+				     <2 0xc9 0 IRQ_TYPE_NONE>;
+		};
 	};
 
 	pmic@3 {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios
  2017-07-27  6:30 ` [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios Vivek Gautam
@ 2017-07-27 21:00   ` Stephen Boyd
  2017-07-28  6:01     ` Vivek Gautam
  0 siblings, 1 reply; 6+ messages in thread
From: Stephen Boyd @ 2017-07-27 21:00 UTC (permalink / raw)
  To: Vivek Gautam, bjorn.andersson, linus.walleij, robh+dt,
	andy.gross, linux-arm-msm
  Cc: rnayak, linux-gpio, devicetree, linux-kernel, linux-arm-kernel

On 07/26/2017 11:30 PM, Vivek Gautam wrote:
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> ---
>  arch/arm64/boot/dts/qcom/pmi8994.dtsi | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> index d3879a4e8076..3b04ca63c31e 100644
> --- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
> @@ -8,6 +8,23 @@
>  		reg = <0x2 SPMI_USID>;
>  		#address-cells = <1>;
>  		#size-cells = <0>;
> +
> +		pmi8994_gpios: gpios@c000 {
> +			compatible = "qcom,pmi8994-gpio";


Please also include the generic "qcom,spmi-gpio" compatible. We really
don't need to add the "qcom,pmi8994-gpio" one to the driver right now so
I would leave that out of the driver but leave it here in the dtsi file
of course.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support
  2017-07-27  6:30 [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Vivek Gautam
  2017-07-27  6:30 ` [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios Vivek Gautam
@ 2017-07-27 21:02 ` Stephen Boyd
  2017-08-03 20:01 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Stephen Boyd @ 2017-07-27 21:02 UTC (permalink / raw)
  To: Vivek Gautam, bjorn.andersson, linus.walleij, robh+dt,
	andy.gross, linux-arm-msm
  Cc: rnayak, linux-gpio, devicetree, linux-kernel, linux-arm-kernel

On 07/26/2017 11:30 PM, Vivek Gautam wrote:
> Update the bindings doc and driver for pmi8994-gpio devices.
>
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> ---
>
> - Have been using this patch-set on db820c [1] for extcon with
>   usb controller. The usb controller uses one of these gpios
>   for usb-id/vbus detection.
>
> [1] https://github.com/boddob/linux/tree/for-qcomlt/4.13rc2-merged
>
>  Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 2 ++
>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c                     | 1 +
>  2 files changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
> index 8d893a874634..74932318d41d 100644
> --- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
> +++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt
> @@ -15,6 +15,7 @@ PMIC's from Qualcomm.
>  		    "qcom,pm8921-gpio"
>  		    "qcom,pm8941-gpio"
>  		    "qcom,pm8994-gpio"
> +		    "qcom,pmi8994-gpio"

pmi comes after pma. Please sort alphabetically.

>  		    "qcom,pma8084-gpio"
>  
>  		    And must contain either "qcom,spmi-gpio" or "qcom,ssbi-gpio"
> @@ -84,6 +85,7 @@ to specify in a pin configuration subnode:
>  		    gpio1-gpio44 for pm8921
>  		    gpio1-gpio36 for pm8941
>  		    gpio1-gpio22 for pm8994
> +		    gpio1-gpio10 for pmi8994
>  		    gpio1-gpio22 for pma8084
>  
>  - function:
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index 664b641fd776..bf0a6438424b 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -799,6 +799,7 @@ static int pmic_gpio_remove(struct platform_device *pdev)
>  	{ .compatible = "qcom,pm8916-gpio" },	/* 4 GPIO's */
>  	{ .compatible = "qcom,pm8941-gpio" },	/* 36 GPIO's */
>  	{ .compatible = "qcom,pm8994-gpio" },	/* 22 GPIO's */
> +	{ .compatible = "qcom,pmi8994-gpio" },	/* 10 GPIO's */

As stated on the other patch, please drop this hunk.

>  	{ .compatible = "qcom,pma8084-gpio" },	/* 22 GPIO's */
>  	{ .compatible = "qcom,spmi-gpio" }, /* Generic */
>  	{ },


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios
  2017-07-27 21:00   ` Stephen Boyd
@ 2017-07-28  6:01     ` Vivek Gautam
  0 siblings, 0 replies; 6+ messages in thread
From: Vivek Gautam @ 2017-07-28  6:01 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Bjorn Andersson, Linus Walleij, robh+dt, Andy Gross,
	linux-arm-msm, Rajendra Nayak, linux-gpio, devicetree,
	linux-kernel, linux-arm-kernel

On Fri, Jul 28, 2017 at 2:30 AM, Stephen Boyd <sboyd@codeaurora.org> wrote:
> On 07/26/2017 11:30 PM, Vivek Gautam wrote:
>> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
>> ---
>>  arch/arm64/boot/dts/qcom/pmi8994.dtsi | 17 +++++++++++++++++
>>  1 file changed, 17 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/pmi8994.dtsi b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
>> index d3879a4e8076..3b04ca63c31e 100644
>> --- a/arch/arm64/boot/dts/qcom/pmi8994.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/pmi8994.dtsi
>> @@ -8,6 +8,23 @@
>>               reg = <0x2 SPMI_USID>;
>>               #address-cells = <1>;
>>               #size-cells = <0>;
>> +
>> +             pmi8994_gpios: gpios@c000 {
>> +                     compatible = "qcom,pmi8994-gpio";
>
>
> Please also include the generic "qcom,spmi-gpio" compatible. We really
> don't need to add the "qcom,pmi8994-gpio" one to the driver right now so
> I would leave that out of the driver but leave it here in the dtsi file
> of course.

Sure, will add the "qcom,spmi-gpio" compatible as well, and will drop the
"qcom,pmi8994-gpio" from the driver.
Thanks.

regards
Vivek

>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support
  2017-07-27  6:30 [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Vivek Gautam
  2017-07-27  6:30 ` [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios Vivek Gautam
  2017-07-27 21:02 ` [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Stephen Boyd
@ 2017-08-03 20:01 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-08-03 20:01 UTC (permalink / raw)
  To: Vivek Gautam
  Cc: bjorn.andersson, linus.walleij, andy.gross, linux-arm-msm,
	rnayak, linux-gpio, devicetree, linux-kernel, linux-arm-kernel

On Thu, Jul 27, 2017 at 12:00:35PM +0530, Vivek Gautam wrote:
> Update the bindings doc and driver for pmi8994-gpio devices.
> 
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
> ---
> 
> - Have been using this patch-set on db820c [1] for extcon with
>   usb controller. The usb controller uses one of these gpios
>   for usb-id/vbus detection.
> 
> [1] https://github.com/boddob/linux/tree/for-qcomlt/4.13rc2-merged
> 
>  Documentation/devicetree/bindings/pinctrl/qcom,pmic-gpio.txt | 2 ++
>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c                     | 1 +
>  2 files changed, 3 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-03 20:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-27  6:30 [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Vivek Gautam
2017-07-27  6:30 ` [PATCH 2/2] arm64: dts: Add device node for pmi8994 gpios Vivek Gautam
2017-07-27 21:00   ` Stephen Boyd
2017-07-28  6:01     ` Vivek Gautam
2017-07-27 21:02 ` [PATCH 1/2] pinctrl: qcom: spmi-gpio: Add pmi8994 gpio support Stephen Boyd
2017-08-03 20:01 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).