Skip to contentSkip to conversation

dt-bindings: pinctrl: qcom,pmic-mpp: Restrict 'mpp' child node name pattern

PATCH In review Rob Herring 3 participants 3 messages Jan 20, 2023

Subsystems (6)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: pinctrl: qcom,pmic-mpp: Restrict 'mpp' child node name pattern

Just 'mpp' is a bit ambiguous for a pattern. It allows any prefix or suffix. I couldn't find any actual users, so update the pattern to match the example.

---
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +1 -1
index 72cce38bc1ce..891a7385d7cb 100644
@@ -74,7 +74,7 @@ patternProperties:
     oneOf:
       - $ref: "#/$defs/qcom-pmic-mpp-state"
       - patternProperties:
-          "mpp":
+          "-mpp$":
             $ref: "#/$defs/qcom-pmic-mpp-state"
         additionalProperties: false
 
Signature · 1 line
2.39.0
maintainer
#1 lore raw
Quoted 14 lines · Rob Herring

Just 'mpp' is a bit ambiguous for a pattern. It allows any prefix or suffix. I couldn't find any actual users, so update the pattern to match the example.

---
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0 -0
index 72cce38bc1ce..891a7385d7cb 100644

Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml patternProperties: · line 77

Quoted 5 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +1 -1
@@ -74,7 +74,7 @@ patternProperties:
     oneOf:
       - $ref: "#/$defs/qcom-pmic-mpp-state"
       - patternProperties:
-          "mpp":
+          "-mpp$":

How about aligning it with the other Qualcomm pinctrl bindings and make it "-pins$" instead?

If my grep is correct we have one "mpp5" and two "-pins$" currently in the sources, so this should be beneficial as well.

Regards,
Bjorn

Quoted 6 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0 -0
             $ref: "#/$defs/qcom-pmic-mpp-state"
         additionalProperties: false
 
Signature · 1 line
2.39.0
#2 lore raw
Quoted 24 lines · Bjorn Andersson
Quoted 14 lines · Rob Herring

Just 'mpp' is a bit ambiguous for a pattern. It allows any prefix or suffix. I couldn't find any actual users, so update the pattern to match the example.

---
 Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0 -0
index 72cce38bc1ce..891a7385d7cb 100644

Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml patternProperties: · line 77

Quoted 5 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +1 -1
@@ -74,7 +74,7 @@ patternProperties:
     oneOf:
       - $ref: "#/$defs/qcom-pmic-mpp-state"
       - patternProperties:
-          "mpp":
+          "-mpp$":

How about aligning it with the other Qualcomm pinctrl bindings and make it "-pins$" instead?

Quoted 2 lines

If my grep is correct we have one "mpp5" and two "-pins$" currently in the sources, so this should be beneficial as well.

Let's align it with other Qualcomm pinctrl bindings, so:

	"-pins$":

I can also fix the DTS to match it.

Best regards,
Krzysztof