Skip to content

Commit caf08a8

Browse files
jhovoldlinusw
authored andcommitted
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. Signed-off-by: Johan Hovold <johan+linaro@kernel.org> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20231130172834.12653-1-johan+linaro@kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 7085e4e commit caf08a8

File tree

1 file changed

+34
-28
lines changed

1 file changed

+34
-28
lines changed

Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -158,34 +158,40 @@ examples:
158158
- |
159159
#include <dt-bindings/pinctrl/qcom,pmic-mpp.h>
160160
161-
pm8841_mpp: mpps@a000 {
162-
compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
163-
reg = <0xa000 0>;
164-
gpio-controller;
165-
#gpio-cells = <2>;
166-
gpio-ranges = <&pm8841_mpp 0 0 4>;
167-
gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
168-
"BT_LED_CTRL", "GPIO-F";
169-
interrupt-controller;
170-
#interrupt-cells = <2>;
171-
172-
pinctrl-names = "default";
173-
pinctrl-0 = <&pm8841_default>;
174-
175-
mpp1-state {
176-
pins = "mpp1";
177-
function = "digital";
178-
input-enable;
179-
power-source = <PM8841_MPP_S3>;
180-
};
181-
182-
default-state {
183-
gpio-pins {
184-
pins = "mpp1", "mpp2", "mpp3", "mpp4";
185-
function = "digital";
186-
input-enable;
187-
power-source = <PM8841_MPP_S3>;
161+
pmic {
162+
#address-cells = <1>;
163+
#size-cells = <0>;
164+
165+
pm8841_mpp: mpps@a000 {
166+
compatible = "qcom,pm8841-mpp", "qcom,spmi-mpp";
167+
reg = <0xa000>;
168+
169+
gpio-controller;
170+
#gpio-cells = <2>;
171+
gpio-ranges = <&pm8841_mpp 0 0 4>;
172+
gpio-line-names = "VDD_PX_BIAS", "WLAN_LED_CTRL",
173+
"BT_LED_CTRL", "GPIO-F";
174+
interrupt-controller;
175+
#interrupt-cells = <2>;
176+
177+
pinctrl-names = "default";
178+
pinctrl-0 = <&pm8841_default>;
179+
180+
mpp1-state {
181+
pins = "mpp1";
182+
function = "digital";
183+
input-enable;
184+
power-source = <PM8841_MPP_S3>;
185+
};
186+
187+
default-state {
188+
gpio-pins {
189+
pins = "mpp1", "mpp2", "mpp3", "mpp4";
190+
function = "digital";
191+
input-enable;
192+
power-source = <PM8841_MPP_S3>;
193+
};
194+
};
188195
};
189-
};
190196
};
191197
...

0 commit comments

Comments
 (0)