Skip to contentSkip to conversation

dt-bindings: pinctrl: mt8195: fix bias-pull-{up,down} checks

PATCH In review Chen-Yu Tsai 3 participants 3 messages Feb 2, 2022 – Feb 11, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: pinctrl: mt8195: fix bias-pull-{up,down} checks

When the constraints and description for bias-pull-{up,down} were added, the constraints were not indented correctly, resulting in them being parsed as part of the description. This effectively nullified their purpose.

Move the constraints out of the description block, make each description part of the same associative array as the enum its describing, and reindent them correctly so they take effect.

Also add "type: boolean" to the list of valid values. This corresponds to having bias-pull-{up,down} without any arguments.

Fixes 91e7edceda96 ("dt-bindings: pinctrl: mt8195: change pull up/down description")
---
 .../bindings/pinctrl/pinctrl-mt8195.yaml      | 30 ++++++++++---------
 1 file changed, 16 insertions(+), 14 deletions(-)
Documentation/devicetree/bindings/pinctrl/pinctrl-mt8195.yaml +16 -14
index 328ea59c5466..8299662c2c09 100644
@@ -99,6 +99,14 @@ patternProperties:
             enum: [2, 4, 6, 8, 10, 12, 14, 16]
 
           bias-pull-down:
+            oneOf:
+              - type: boolean
+              - enum: [100, 101, 102, 103]
+                description: mt8195 pull down PUPD/R0/R1 type define value.
+              - enum: [200, 201, 202, 203, 204, 205, 206, 207]
+                description: mt8195 pull down RSEL type define value.
+              - enum: [75000, 5000]
+                description: mt8195 pull down RSEL type si unit value(ohm).
             description: |
               For pull down type is normal, it don't need add RSEL & R1R0 define
               and resistance value.
@@ -115,13 +123,6 @@ patternProperties:
               & "MTK_PULL_SET_RSEL_110" & "MTK_PULL_SET_RSEL_111"
               define in mt8195. It can also support resistance value(ohm)
               "75000" & "5000" in mt8195.
-              oneOf:
-                - enum: [100, 101, 102, 103]
-                - description: mt8195 pull down PUPD/R0/R1 type define value.
-                - enum: [200, 201, 202, 203, 204, 205, 206, 207]
-                - description: mt8195 pull down RSEL type define value.
-                - enum: [75000, 5000]
-                - description: mt8195 pull down RSEL type si unit value(ohm).
 
               An example of using RSEL define:
               pincontroller {
@@ -146,6 +147,14 @@ patternProperties:
               };
 
           bias-pull-up:
+            oneOf:
+              - type: boolean
+              - enum: [100, 101, 102, 103]
+                description: mt8195 pull up PUPD/R0/R1 type define value.
+              - enum: [200, 201, 202, 203, 204, 205, 206, 207]
+                description: mt8195 pull up RSEL type define value.
+              - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
+                description: mt8195 pull up RSEL type si unit value(ohm).
             description: |
               For pull up type is normal, it don't need add RSEL & R1R0 define
               and resistance value.
@@ -163,13 +172,6 @@ patternProperties:
               define in mt8195. It can also support resistance value(ohm)
               "1000" & "1500" & "2000" & "3000" & "4000" & "5000" & "10000" &
               "75000" in mt8195.
-              oneOf:
-                - enum: [100, 101, 102, 103]
-                - description: mt8195 pull up PUPD/R0/R1 type define value.
-                - enum: [200, 201, 202, 203, 204, 205, 206, 207]
-                - description: mt8195 pull up RSEL type define value.
-                - enum: [1000, 1500, 2000, 3000, 4000, 5000, 10000, 75000]
-                - description: mt8195 pull up RSEL type si unit value(ohm).
               An example of using RSEL define:
               pincontroller {
                 i2c0-pins {
Signature · 1 line
2.35.0.rc2.247.g8bbb082509-goog
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Chen-Yu Tsai

When the constraints and description for bias-pull-{up,down} were added, the constraints were not indented correctly, resulting in them being parsed as part of the description. This effectively nullified their purpose.

Move the constraints out of the description block, make each description part of the same associative array as the enum its describing, and reindent them correctly so they take effect.

Quoted 9 lines

Also add "type: boolean" to the list of valid values. This corresponds to having bias-pull-{up,down} without any arguments.

Fixes 91e7edceda96 ("dt-bindings: pinctrl: mt8195: change pull up/down description")
---
 .../bindings/pinctrl/pinctrl-mt8195.yaml      | 30 ++++++++++---------
 1 file changed, 16 insertions(+), 14 deletions(-)

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek

#2 lore raw
In reply to Chen-Yu Tsai
Quoted 9 lines · Chen-Yu Tsai

When the constraints and description for bias-pull-{up,down} were added, the constraints were not indented correctly, resulting in them being parsed as part of the description. This effectively nullified their purpose.

Move the constraints out of the description block, make each description part of the same associative array as the enum its describing, and reindent them correctly so they take effect.

Quoted 5 lines

Also add "type: boolean" to the list of valid values. This corresponds to having bias-pull-{up,down} without any arguments.

Fixes 91e7edceda96 ("dt-bindings: pinctrl: mt8195: change pull up/down description")

Patch applied!

Yours,
Linus Walleij