dt-bindings: pinctrl: qcom,pmic-mpp: Fix schema for "qcom,paired"
Subsystems (6)
Rob Herring
maintainerPATCH 1/1 dt-bindings: pinctrl: qcom,pmic-mpp: Fix schema for "qcom,paired"
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +3 -2
@@ -144,8 +144,9 @@ $defs: enum: [0, 1, 2, 3, 4, 5, 6, 7] qcom,paired: - - description: - Indicates that the pin should be operating in paired mode. + type: boolean + description: + Indicates that the pin should be operating in paired mode. required: - pins
Signature · 1 line
2.39.2
Quoted 15 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Signed-off-by Rob Herring <[email protected]>--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0
-0
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml $defs: · line 149
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +3
-2@@ -144,8 +144,9 @@ $defs: enum: [0, 1, 2, 3, 4, 5, 6, 7] qcom,paired: - - description: - Indicates that the pin should be operating in paired mode. + type: boolean + description: + Indicates that the pin should be operating in paired mode.
Current Linux implementation uses it as a generic pinconf param pinconf_generic_params which is parsed by:
pinconf_generic_parse_dt_config() -> parse_dt_cfg() -> of_property_read_u32()
The pinctrl-spmi-mpp.c driver, using this schema, treat it as a bool, but I still wonder how the code will parse bool with of_property_read_u32(). Maybe it should be uint32 with value of 0 and 1?
Best regards,
Krzysztof
Rob Herring
maintainerQuoted 29 lines · Krzysztof Kozlowski
Quoted 15 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Signed-off-by Rob Herring <[email protected]>--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0
-0Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml $defs: · line 149
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +3
-2@@ -144,8 +144,9 @@ $defs: enum: [0, 1, 2, 3, 4, 5, 6, 7] qcom,paired: - - description: - Indicates that the pin should be operating in paired mode. + type: boolean + description: + Indicates that the pin should be operating in paired mode.Current Linux implementation uses it as a generic pinconf param
pinconf_generic_paramswhich is parsed by:
Quoted 7 lines
pinconf_generic_parse_dt_config()->parse_dt_cfg()->of_property_read_u32()The
pinctrl-spmi-mpp.cdriver, using this schema, treat it as a bool, but I still wonder how the code will parse bool withof_property_read_u32(). Maybe it should be uint32 with value of 0 and 1?
That should be an error because the length is too short so it should go with some default from the code.
Looks like there is no user, though no property could mean keep the default/bootloader setting. Can you sort out which type is really desired here and hopefully we can get rid of the other type. It's not the first case of pinctrl properties with multiple types, but we don't really need more.
Rob
Rob Herring
maintainerQuoted 40 lines · Rob Herring
Quoted 29 lines · Krzysztof Kozlowski
Quoted 15 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Signed-off-by Rob Herring <[email protected]>--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0
-0Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml $defs: · line 149
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +3
-2@@ -144,8 +144,9 @@ $defs: enum: [0, 1, 2, 3, 4, 5, 6, 7] qcom,paired: - - description: - Indicates that the pin should be operating in paired mode. + type: boolean + description: + Indicates that the pin should be operating in paired mode.Current Linux implementation uses it as a generic pinconf param
pinconf_generic_paramswhich is parsed by:Quoted 7 lines
pinconf_generic_parse_dt_config()->parse_dt_cfg()->of_property_read_u32()The
pinctrl-spmi-mpp.cdriver, using this schema, treat it as a bool, but I still wonder how the code will parse bool withof_property_read_u32(). Maybe it should be uint32 with value of 0 and 1?
Quoted 8 lines
That should be an error because the length is too short so it should go with some default from the code.
Looks like there is no user, though no property could mean keep the default/bootloader setting. Can you sort out which type is really desired here and hopefully we can get rid of the other type. It's not the first case of pinctrl properties with multiple types, but we don't really need more.
Still an issue here. Please sort out what functionality QCom wants here.
dtschema (main br) will now throw a warning on it.
Rob
Quoted 50 lines · Rob Herring
Quoted 40 lines · Rob Herring
Quoted 29 lines · Krzysztof Kozlowski
Quoted 15 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Signed-off-by Rob Herring <[email protected]>--- Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +0
-0Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml $defs: · line 149
Quoted 8 lines
Documentation/devicetree/bindings/pinctrl/qcom,pmic-mpp.yaml +3
-2@@ -144,8 +144,9 @@ $defs: enum: [0, 1, 2, 3, 4, 5, 6, 7] qcom,paired: - - description: - Indicates that the pin should be operating in paired mode. + type: boolean + description: + Indicates that the pin should be operating in paired mode.Current Linux implementation uses it as a generic pinconf param
pinconf_generic_paramswhich is parsed by:Quoted 7 lines
pinconf_generic_parse_dt_config()->parse_dt_cfg()->of_property_read_u32()The
pinctrl-spmi-mpp.cdriver, using this schema, treat it as a bool, but I still wonder how the code will parse bool withof_property_read_u32(). Maybe it should be uint32 with value of 0 and 1?Quoted 8 lines
That should be an error because the length is too short so it should go with some default from the code.
Looks like there is no user, though no property could mean keep the default/bootloader setting. Can you sort out which type is really desired here and hopefully we can get rid of the other type. It's not the first case of pinctrl properties with multiple types, but we don't really need more.
Quoted 3 lines
Still an issue here. Please sort out what functionality QCom wants here.
dtschema (main br) will now throw a warning on it.
I think we can go with your patch, after double checking my previous concerns are not relevant here - driver reads it as bool just like other bool properties.
Best regards,
Krzysztof
Quoted 7 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Signed-off-by Rob Herring <[email protected]>---
Linus,
Could you take it for current fixes? The code was wrong and dtschema is warning now about this.
pmic mpp bindings to YAML")
Best regards,
Krzysztof
Rob Herring
maintainerQuoted 7 lines · Krzysztof Kozlowski
Quoted 5 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Rob Herring <[email protected]>---
Linus,
Could you take it for current fixes? The code was wrong and dtschema is warning now about this.
I have other things ready for 6.4, so I'll add this one.
Thanks,
Rob
Quoted 11 lines
Fixes f9a06b810951 ("dt-bindings: pinctrl: qcom,pmic-mpp: Convert qcompmic mpp bindings to YAML")
Reviewed-by Krzysztof Kozlowski <[email protected]>Best regards,
Krzysztof
Linus Walleij
Reviewed-byQuoted 9 lines · Rob Herring
Quoted 7 lines · Krzysztof Kozlowski
Quoted 5 lines · Rob Herring
The "qcom,paired" schema is all wrong. First, it's a list rather than an object(dictionary). Second, it is missing a required type. The meta-schema normally catches this, but schemas under "$defs" was not getting checked. A fix for that is pending.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Signed-off-by Rob Herring <[email protected]>---
Linus,
Could you take it for current fixes? The code was wrong and dtschema is warning now about this.I have other things ready for 6.4, so I'll add this one.
Thanks for picking this one Rob!
Yours,
Linus Walleij