dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
Subsystems (6)
PATCH 1/1 dt-bindings: pinctrl: qcom,pmic-mpp: clean up example
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.
--- .../bindings/pinctrl/qcom,pmic-mpp.yaml | 62 ++++++++++--------- 1 file changed, 34 insertions(+), 28 deletions(-)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +34 -28
@@ -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>; + }; + }; }; - }; }; ...
Signature · 1 line
2.41.0
Quoted 11 lines · 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 <[email protected]>---
Best regards,
Krzysztof
Rob Herring
maintainerQuoted 8 lines · 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.
This is fine, but I prefer these MFDs have 1 complete example rather than piecemeal examples for each child device.
Rob
Quoted 5 lines · Rob Herring
Quoted 4 lines · 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.
Quoted 7 lines
Quoted 4 lines
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
Rob Herring
maintainerQuoted 15 lines · Johan Hovold
Quoted 5 lines · Rob Herring
Quoted 4 lines · 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.
Quoted 7 lines
Quoted 4 lines
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.
Quoted 7 lines
Yeah, this is not ideal. The closest thing we've got are the examples in:
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yamlAre 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.
Quoted 2 lines
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
Quoted 9 lines · Rob Herring
Quoted 8 lines · Johan Hovold
Quoted 2 lines · Rob Herring
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:
Quoted 8 lines
Quoted 4 lines
Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yamlAre 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.
Quoted 5 lines
Quoted 2 lines
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
Hi Linus,
Quoted 10 lines · 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 <[email protected]>
Can you pick this one up for 6.8?
Johan
Quoted 7 lines · Johan Hovold
Hi Linus,
Quoted 4 lines · 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.
Quoted 8 lines
Quoted 6 lines
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 <[email protected]>Can you pick this one up for 6.8?
OK, patch applied!
Yours,
Linus Walleij