* [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
@ 2023-11-30 17:28 Johan Hovold
2023-12-01 8:34 ` Krzysztof Kozlowski
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Johan Hovold @ 2023-11-30 17:28 UTC (permalink / raw)
To: Linus Walleij
Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-gpio,
devicetree, linux-kernel, Johan Hovold
The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
turns sits on an SPMI bus) and uses a single value for the register
property that corresponds to its base address.
Clean up the example by adding a parent PMIC node with proper
'#address-cells' and '#size-cells' properties, dropping the incorrect
second register value, adding some newline separators and increasing the
indentation to four spaces.
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
.../bindings/pinctrl/qcom,pmic-mpp.yaml | 62 ++++++++++---------
1 file changed, 34 insertions(+), 28 deletions(-)
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
index 80f960671857..fe717d8d4798 100644
--- a/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
+++ b/Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml
@@ -158,34 +158,40 @@ examples:
- |
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
- pm8841_mpp: mpps@a000 {
- compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
- reg = <0xa000 0>;
- gpio-controller;
- #gpio-cells = <2>;
- gpio-ranges = <&pm8841_mpp 0 0 4>;
- gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
- "BT_LED_CTRL", "GPIO-F";
- interrupt-controller;
- #interrupt-cells = <2>;
-
- pinctrl-names = "default";
- pinctrl-0 = <&pm8841_default>;
-
- mpp1-state {
- pins = "mpp1";
- function = "digital";
- input-enable;
- power-source = <PM8841_MPP_S3>;
- };
-
- default-state {
- gpio-pins {
- pins = "mpp1", "mpp2", "mpp3", "mpp4";
- function = "digital";
- input-enable;
- power-source = <PM8841_MPP_S3>;
+ pmic {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ pm8841_mpp: mpps@a000 {
+ compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
+ reg = <0xa000>;
+
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pm8841_mpp 0 0 4>;
+ gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
+ "BT_LED_CTRL", "GPIO-F";
+ interrupt-controller;
+ #interrupt-cells = <2>;
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&pm8841_default>;
+
+ mpp1-state {
+ pins = "mpp1";
+ function = "digital";
+ input-enable;
+ power-source = <PM8841_MPP_S3>;
+ };
+
+ default-state {
+ gpio-pins {
+ pins = "mpp1", "mpp2", "mpp3", "mpp4";
+ function = "digital";
+ input-enable;
+ power-source = <PM8841_MPP_S3>;
+ };
+ };
};
- };
};
...
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-11-30 17:28 [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example Johan Hovold
@ 2023-12-01 8:34 ` Krzysztof Kozlowski
2023-12-01 14:43 ` Rob Herring
2023-12-19 16:00 ` Johan Hovold
2 siblings, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-01 8:34 UTC (permalink / raw)
To: Johan Hovold, Linus Walleij
Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-gpio,
devicetree, linux-kernel
On 30/11/2023 18:28, Johan Hovold wrote:
> The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
> turns sits on an SPMI bus) and uses a single value for the register
> property that corresponds to its base address.
>
> Clean up the example by adding a parent PMIC node with proper
> '#address-cells' and '#size-cells' properties, dropping the incorrect
> second register value, adding some newline separators and increasing the
> indentation to four spaces.
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-11-30 17:28 [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example Johan Hovold
2023-12-01 8:34 ` Krzysztof Kozlowski
@ 2023-12-01 14:43 ` Rob Herring
2023-12-01 16:57 ` Johan Hovold
2023-12-19 16:00 ` Johan Hovold
2 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2023-12-01 14:43 UTC (permalink / raw)
To: Johan Hovold
Cc: Linus Walleij, Bjorn Andersson, Andy Gross, Konrad Dybcio,
Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-gpio,
devicetree, linux-kernel
On Thu, Nov 30, 2023 at 06:28:34PM +0100, Johan Hovold wrote:
> The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
> turns sits on an SPMI bus) and uses a single value for the register
> property that corresponds to its base address.
>
> Clean up the example by adding a parent PMIC node with proper
> '#address-cells' and '#size-cells' properties, dropping the incorrect
> second register value, adding some newline separators and increasing the
> indentation to four spaces.
This is fine, but I prefer these MFDs have 1 complete example rather
than piecemeal examples for each child device.
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-12-01 14:43 ` Rob Herring
@ 2023-12-01 16:57 ` Johan Hovold
2023-12-01 19:51 ` Rob Herring
0 siblings, 1 reply; 8+ messages in thread
From: Johan Hovold @ 2023-12-01 16:57 UTC (permalink / raw)
To: Rob Herring
Cc: Johan Hovold, Linus Walleij, Bjorn Andersson, Andy Gross,
Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
linux-gpio, devicetree, linux-kernel
On Fri, Dec 01, 2023 at 08:43:20AM -0600, Rob Herring wrote:
> On Thu, Nov 30, 2023 at 06:28:34PM +0100, Johan Hovold wrote:
> > The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
> > turns sits on an SPMI bus) and uses a single value for the register
> > property that corresponds to its base address.
> >
> > Clean up the example by adding a parent PMIC node with proper
> > '#address-cells' and '#size-cells' properties, dropping the incorrect
> > second register value, adding some newline separators and increasing the
> > indentation to four spaces.
>
> This is fine, but I prefer these MFDs have 1 complete example rather
> than piecemeal examples for each child device.
Yeah, this is not ideal. The closest thing we've got are the examples
in:
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
Are you suggesting eventually dropping the examples from the child node
bindings and adding (several) complete examples in the parent one?
I guess there would need to be more than one if you want to cover all
the various child nodes with real examples.
Johan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-12-01 16:57 ` Johan Hovold
@ 2023-12-01 19:51 ` Rob Herring
2023-12-04 9:48 ` Johan Hovold
0 siblings, 1 reply; 8+ messages in thread
From: Rob Herring @ 2023-12-01 19:51 UTC (permalink / raw)
To: Johan Hovold
Cc: Johan Hovold, Linus Walleij, Bjorn Andersson, Andy Gross,
Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
linux-gpio, devicetree, linux-kernel
On Fri, Dec 1, 2023 at 10:56 AM Johan Hovold <johan@kernel.org> wrote:
>
> On Fri, Dec 01, 2023 at 08:43:20AM -0600, Rob Herring wrote:
> > On Thu, Nov 30, 2023 at 06:28:34PM +0100, Johan Hovold wrote:
> > > The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
> > > turns sits on an SPMI bus) and uses a single value for the register
> > > property that corresponds to its base address.
> > >
> > > Clean up the example by adding a parent PMIC node with proper
> > > '#address-cells' and '#size-cells' properties, dropping the incorrect
> > > second register value, adding some newline separators and increasing the
> > > indentation to four spaces.
> >
> > This is fine, but I prefer these MFDs have 1 complete example rather
> > than piecemeal examples for each child device.
>
> Yeah, this is not ideal. The closest thing we've got are the examples
> in:
>
> Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
>
> Are you suggesting eventually dropping the examples from the child node
> bindings and adding (several) complete examples in the parent one?
Yes, but if the child nodes are truly reused across multiple PMICs
then, it is probably a worthwhile exception. There's not a great deal
of reuse on most MFDs.
> I guess there would need to be more than one if you want to cover all
> the various child nodes with real examples.
We don't want examples to be exhaustive permutations of every
possibility either.
Rob
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-12-01 19:51 ` Rob Herring
@ 2023-12-04 9:48 ` Johan Hovold
0 siblings, 0 replies; 8+ messages in thread
From: Johan Hovold @ 2023-12-04 9:48 UTC (permalink / raw)
To: Rob Herring
Cc: Johan Hovold, Linus Walleij, Bjorn Andersson, Andy Gross,
Konrad Dybcio, Krzysztof Kozlowski, Conor Dooley, linux-arm-msm,
linux-gpio, devicetree, linux-kernel
On Fri, Dec 01, 2023 at 01:51:06PM -0600, Rob Herring wrote:
> On Fri, Dec 1, 2023 at 10:56 AM Johan Hovold <johan@kernel.org> wrote:
> > On Fri, Dec 01, 2023 at 08:43:20AM -0600, Rob Herring wrote:
> > > This is fine, but I prefer these MFDs have 1 complete example rather
> > > than piecemeal examples for each child device.
> >
> > Yeah, this is not ideal. The closest thing we've got are the examples
> > in:
> >
> > Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
> >
> > Are you suggesting eventually dropping the examples from the child node
> > bindings and adding (several) complete examples in the parent one?
>
> Yes, but if the child nodes are truly reused across multiple PMICs
> then, it is probably a worthwhile exception. There's not a great deal
> of reuse on most MFDs.
Yes, they are indeed reused by multiple PMICs in this case.
> > I guess there would need to be more than one if you want to cover all
> > the various child nodes with real examples.
>
> We don't want examples to be exhaustive permutations of every
> possibility either.
Not every possible permutation but I guess we'd want coverage of all the
various child nodes still (i.e. the child node examples that would have
been removed).
Johan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-11-30 17:28 [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example Johan Hovold
2023-12-01 8:34 ` Krzysztof Kozlowski
2023-12-01 14:43 ` Rob Herring
@ 2023-12-19 16:00 ` Johan Hovold
2023-12-20 10:47 ` Linus Walleij
2 siblings, 1 reply; 8+ messages in thread
From: Johan Hovold @ 2023-12-19 16:00 UTC (permalink / raw)
To: Linus Walleij
Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-gpio,
devicetree, linux-kernel
Hi Linus,
On Thu, Nov 30, 2023 at 06:28:34PM +0100, Johan Hovold wrote:
> The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
> turns sits on an SPMI bus) and uses a single value for the register
> property that corresponds to its base address.
>
> Clean up the example by adding a parent PMIC node with proper
> '#address-cells' and '#size-cells' properties, dropping the incorrect
> second register value, adding some newline separators and increasing the
> indentation to four spaces.
>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Can you pick this one up for 6.8?
Johan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
2023-12-19 16:00 ` Johan Hovold
@ 2023-12-20 10:47 ` Linus Walleij
0 siblings, 0 replies; 8+ messages in thread
From: Linus Walleij @ 2023-12-20 10:47 UTC (permalink / raw)
To: Johan Hovold
Cc: Bjorn Andersson, Andy Gross, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-arm-msm, linux-gpio,
devicetree, linux-kernel
On Tue, Dec 19, 2023 at 5:00 PM Johan Hovold <johan@kernel.org> wrote:
> Hi Linus,
>
> On Thu, Nov 30, 2023 at 06:28:34PM +0100, Johan Hovold wrote:
> > The Multi-Purpose Pin controller block is part of an SPMI PMIC (which in
> > turns sits on an SPMI bus) and uses a single value for the register
> > property that corresponds to its base address.
> >
> > Clean up the example by adding a parent PMIC node with proper
> > '#address-cells' and '#size-cells' properties, dropping the incorrect
> > second register value, adding some newline separators and increasing the
> > indentation to four spaces.
> >
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
>
> Can you pick this one up for 6.8?
OK, patch applied!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-20 10:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-30 17:28 [PATCH] dt-bindings: pinctrl: qcom,pmic-mpp: clean up example Johan Hovold
2023-12-01 8:34 ` Krzysztof Kozlowski
2023-12-01 14:43 ` Rob Herring
2023-12-01 16:57 ` Johan Hovold
2023-12-01 19:51 ` Rob Herring
2023-12-04 9:48 ` Johan Hovold
2023-12-19 16:00 ` Johan Hovold
2023-12-20 10:47 ` Linus Walleij
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).