Message ID | 20220224164831.21475-2-ansuelsmth@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Multiple addition and improvement to ipq8064 gcc | expand |
On Thu, 24 Feb 2022 17:48:17 +0100, Ansuel Smith wrote: > Split qcom,gcc.yaml to common and specific schema to use it as a > template for schema that needs to use the gcc bindings and require > to add additional bindings. > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > --- > .../bindings/clock/qcom,gcc-other.yaml | 76 +++++++++++++++++++ > .../devicetree/bindings/clock/qcom,gcc.yaml | 59 +------------- > 2 files changed, 80 insertions(+), 55 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > Reviewed-by: Rob Herring <robh@kernel.org>
Quoting Ansuel Smith (2022-02-24 08:48:17) > Split qcom,gcc.yaml to common and specific schema to use it as a > template for schema that needs to use the gcc bindings and require > to add additional bindings. > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > --- Reviewed-by: Stephen Boyd <sboyd@kernel.org>
On Thu, Feb 24, 2022 at 10:48 AM Ansuel Smith <ansuelsmth@gmail.com> wrote: > > Split qcom,gcc.yaml to common and specific schema to use it as a > template for schema that needs to use the gcc bindings and require > to add additional bindings. > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > --- > .../bindings/clock/qcom,gcc-other.yaml | 76 +++++++++++++++++++ This now throws errors in linux-next: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 816, in resolve_from_url document = self.resolve_remote(url) File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 923, in resolve_remote result = json.loads(url.read().decode("utf-8")) File "/usr/lib/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/bin/dt-doc-validate", line 70, in <module> ret = check_doc(f) File "/usr/local/bin/dt-doc-validate", line 36, in check_doc for error in sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda e: e.linecol): File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line 1016, in iter_schema_errors meta_schema = cls.resolver.resolve_from_url(schema['$schema']) File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", line 818, in resolve_from_url raise exceptions.RefResolutionError(exc) jsonschema.exceptions.RefResolutionError: Expecting value: line 1 column 1 (char 0) ./Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml: mapping values are not allowed in this context in "<unicode string>", line 17, column 11 > .../devicetree/bindings/clock/qcom,gcc.yaml | 59 +------------- > 2 files changed, 80 insertions(+), 55 deletions(-) > create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > new file mode 100644 > index 000000000000..4e5903bcd70d > --- /dev/null > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > @@ -0,0 +1,76 @@ > +# SPDX-License-Identifier: GPL-2.0-only > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/clock/qcom,gcc-other.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Qualcomm Global Clock & Reset Controller Binding > + > +maintainers: > + - Stephen Boyd <sboyd@kernel.org> > + - Taniya Das <tdas@codeaurora.org> > + > +description: > + Qualcomm global clock control module which supports the clocks, resets and > + power domains. > + > + See also: I think the problem is here. You need a '|' after 'description' to preserve formatting and ignore what looks like a mapping. > + - dt-bindings/clock/qcom,gcc-apq8084.h > + - dt-bindings/reset/qcom,gcc-apq8084.h > + - dt-bindings/clock/qcom,gcc-ipq4019.h > + - dt-bindings/clock/qcom,gcc-ipq6018.h > + - dt-bindings/reset/qcom,gcc-ipq6018.h > + - dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) > + - dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) > + - dt-bindings/clock/qcom,gcc-msm8939.h > + - dt-bindings/clock/qcom,gcc-msm8953.h > + - dt-bindings/reset/qcom,gcc-msm8939.h > + - dt-bindings/clock/qcom,gcc-msm8660.h > + - dt-bindings/reset/qcom,gcc-msm8660.h > + - dt-bindings/clock/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) > + - dt-bindings/reset/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) > + - dt-bindings/clock/qcom,gcc-mdm9607.h > + - dt-bindings/clock/qcom,gcc-mdm9615.h > + - dt-bindings/reset/qcom,gcc-mdm9615.h > + - dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660)
On Wed, Mar 23, 2022 at 08:55:30AM -0500, Rob Herring wrote: > On Thu, Feb 24, 2022 at 10:48 AM Ansuel Smith <ansuelsmth@gmail.com> wrote: > > > > Split qcom,gcc.yaml to common and specific schema to use it as a > > template for schema that needs to use the gcc bindings and require > > to add additional bindings. > > > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > > --- > > .../bindings/clock/qcom,gcc-other.yaml | 76 +++++++++++++++++++ > > This now throws errors in linux-next: > > Traceback (most recent call last): > File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", > line 816, in resolve_from_url > document = self.resolve_remote(url) > File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", > line 923, in resolve_remote > result = json.loads(url.read().decode("utf-8")) > File "/usr/lib/python3.8/json/__init__.py", line 357, in loads > return _default_decoder.decode(s) > File "/usr/lib/python3.8/json/decoder.py", line 337, in decode > obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode > raise JSONDecodeError("Expecting value", s, err.value) from None > json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) > During handling of the above exception, another exception occurred: > Traceback (most recent call last): > File "/usr/local/bin/dt-doc-validate", line 70, in <module> > ret = check_doc(f) > File "/usr/local/bin/dt-doc-validate", line 36, in check_doc > for error in > sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda > e: e.linecol): > File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line > 1016, in iter_schema_errors > meta_schema = cls.resolver.resolve_from_url(schema['$schema']) > File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", > line 818, in resolve_from_url > raise exceptions.RefResolutionError(exc) > jsonschema.exceptions.RefResolutionError: Expecting value: line 1 > column 1 (char 0) > ./Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml: > mapping values are not allowed in this context > in "<unicode string>", line 17, column 11 > > > .../devicetree/bindings/clock/qcom,gcc.yaml | 59 +------------- > > 2 files changed, 80 insertions(+), 55 deletions(-) > > create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > > > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > new file mode 100644 > > index 000000000000..4e5903bcd70d > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > @@ -0,0 +1,76 @@ > > +# SPDX-License-Identifier: GPL-2.0-only > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/clock/qcom,gcc-other.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Qualcomm Global Clock & Reset Controller Binding > > + > > +maintainers: > > + - Stephen Boyd <sboyd@kernel.org> > > + - Taniya Das <tdas@codeaurora.org> > > + > > +description: > > + Qualcomm global clock control module which supports the clocks, resets and > > + power domains. > > + > > + See also: > > I think the problem is here. You need a '|' after 'description' to > preserve formatting and ignore what looks like a mapping. > Yes, I just sent a patch to fix this. Out of curiosity, any idea why this wasn't flagged by an old run of dt_binding_check? I totally remember running dt_binding_check on these Documentation and I had no problem. There was a bug in the old version and it does now correctly find these kind of errors? > > + - dt-bindings/clock/qcom,gcc-apq8084.h > > + - dt-bindings/reset/qcom,gcc-apq8084.h > > + - dt-bindings/clock/qcom,gcc-ipq4019.h > > + - dt-bindings/clock/qcom,gcc-ipq6018.h > > + - dt-bindings/reset/qcom,gcc-ipq6018.h > > + - dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) > > + - dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) > > + - dt-bindings/clock/qcom,gcc-msm8939.h > > + - dt-bindings/clock/qcom,gcc-msm8953.h > > + - dt-bindings/reset/qcom,gcc-msm8939.h > > + - dt-bindings/clock/qcom,gcc-msm8660.h > > + - dt-bindings/reset/qcom,gcc-msm8660.h > > + - dt-bindings/clock/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) > > + - dt-bindings/reset/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) > > + - dt-bindings/clock/qcom,gcc-mdm9607.h > > + - dt-bindings/clock/qcom,gcc-mdm9615.h > > + - dt-bindings/reset/qcom,gcc-mdm9615.h > > + - dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660)
On Wed, Mar 23, 2022 at 08:47:15PM +0100, Ansuel Smith wrote: > On Wed, Mar 23, 2022 at 08:55:30AM -0500, Rob Herring wrote: > > On Thu, Feb 24, 2022 at 10:48 AM Ansuel Smith <ansuelsmth@gmail.com> wrote: > > > > > > Split qcom,gcc.yaml to common and specific schema to use it as a > > > template for schema that needs to use the gcc bindings and require > > > to add additional bindings. > > > > > > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> > > > --- > > > .../bindings/clock/qcom,gcc-other.yaml | 76 +++++++++++++++++++ > > > > This now throws errors in linux-next: > > > > Traceback (most recent call last): > > File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", > > line 816, in resolve_from_url > > document = self.resolve_remote(url) > > File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", > > line 923, in resolve_remote > > result = json.loads(url.read().decode("utf-8")) > > File "/usr/lib/python3.8/json/__init__.py", line 357, in loads > > return _default_decoder.decode(s) > > File "/usr/lib/python3.8/json/decoder.py", line 337, in decode > > obj, end = self.raw_decode(s, idx=_w(s, 0).end()) > > File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode > > raise JSONDecodeError("Expecting value", s, err.value) from None > > json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > > File "/usr/local/bin/dt-doc-validate", line 70, in <module> > > ret = check_doc(f) > > File "/usr/local/bin/dt-doc-validate", line 36, in check_doc > > for error in > > sorted(dtschema.DTValidator.iter_schema_errors(testtree), key=lambda > > e: e.linecol): > > File "/usr/local/lib/python3.8/dist-packages/dtschema/lib.py", line > > 1016, in iter_schema_errors > > meta_schema = cls.resolver.resolve_from_url(schema['$schema']) > > File "/usr/local/lib/python3.8/dist-packages/jsonschema/validators.py", > > line 818, in resolve_from_url > > raise exceptions.RefResolutionError(exc) > > jsonschema.exceptions.RefResolutionError: Expecting value: line 1 > > column 1 (char 0) > > ./Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml: > > mapping values are not allowed in this context > > in "<unicode string>", line 17, column 11 > > > > > .../devicetree/bindings/clock/qcom,gcc.yaml | 59 +------------- > > > 2 files changed, 80 insertions(+), 55 deletions(-) > > > create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > > new file mode 100644 > > > index 000000000000..4e5903bcd70d > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml > > > @@ -0,0 +1,76 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/clock/qcom,gcc-other.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Qualcomm Global Clock & Reset Controller Binding > > > + > > > +maintainers: > > > + - Stephen Boyd <sboyd@kernel.org> > > > + - Taniya Das <tdas@codeaurora.org> > > > + > > > +description: > > > + Qualcomm global clock control module which supports the clocks, resets and > > > + power domains. > > > + > > > + See also: > > > > I think the problem is here. You need a '|' after 'description' to > > preserve formatting and ignore what looks like a mapping. > > > > Yes, I just sent a patch to fix this. > Out of curiosity, any idea why this wasn't flagged by an old run of > dt_binding_check? I totally remember running dt_binding_check on these > Documentation and I had no problem. There was a bug in the old version > and it does now correctly find these kind of errors? Not sure exactly, but I don't think there was any change. v3 didn't have the issue and the bot checks didn't run on v4 or later. Probably because it couldn't apply them. Rob
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml new file mode 100644 index 000000000000..4e5903bcd70d --- /dev/null +++ b/Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: GPL-2.0-only +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/clock/qcom,gcc-other.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Global Clock & Reset Controller Binding + +maintainers: + - Stephen Boyd <sboyd@kernel.org> + - Taniya Das <tdas@codeaurora.org> + +description: + Qualcomm global clock control module which supports the clocks, resets and + power domains. + + See also: + - dt-bindings/clock/qcom,gcc-apq8084.h + - dt-bindings/reset/qcom,gcc-apq8084.h + - dt-bindings/clock/qcom,gcc-ipq4019.h + - dt-bindings/clock/qcom,gcc-ipq6018.h + - dt-bindings/reset/qcom,gcc-ipq6018.h + - dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) + - dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) + - dt-bindings/clock/qcom,gcc-msm8939.h + - dt-bindings/clock/qcom,gcc-msm8953.h + - dt-bindings/reset/qcom,gcc-msm8939.h + - dt-bindings/clock/qcom,gcc-msm8660.h + - dt-bindings/reset/qcom,gcc-msm8660.h + - dt-bindings/clock/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) + - dt-bindings/reset/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) + - dt-bindings/clock/qcom,gcc-mdm9607.h + - dt-bindings/clock/qcom,gcc-mdm9615.h + - dt-bindings/reset/qcom,gcc-mdm9615.h + - dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660) + +allOf: + - $ref: "qcom,gcc.yaml#" + +properties: + compatible: + enum: + - qcom,gcc-apq8084 + - qcom,gcc-ipq4019 + - qcom,gcc-ipq6018 + - qcom,gcc-ipq8064 + - qcom,gcc-mdm9607 + - qcom,gcc-msm8226 + - qcom,gcc-msm8660 + - qcom,gcc-msm8916 + - qcom,gcc-msm8939 + - qcom,gcc-msm8953 + - qcom,gcc-msm8960 + - qcom,gcc-msm8974 + - qcom,gcc-msm8974pro + - qcom,gcc-msm8974pro-ac + - qcom,gcc-mdm9615 + - qcom,gcc-sdm630 + - qcom,gcc-sdm660 + +required: + - compatible + +unevaluatedProperties: false + +examples: + # Example for GCC for MSM8960: + - | + clock-controller@900000 { + compatible = "qcom,gcc-msm8960"; + reg = <0x900000 0x4000>; + #clock-cells = <1>; + #reset-cells = <1>; + #power-domain-cells = <1>; + }; +... diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml index f66d703bd913..2ed27a2ef445 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc.yaml +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.yaml @@ -4,57 +4,17 @@ $id: http://devicetree.org/schemas/clock/qcom,gcc.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# -title: Qualcomm Global Clock & Reset Controller Binding +title: Qualcomm Global Clock & Reset Controller Binding Common Bindings maintainers: - Stephen Boyd <sboyd@kernel.org> - Taniya Das <tdas@codeaurora.org> description: | - Qualcomm global clock control module which supports the clocks, resets and - power domains. - - See also: - - dt-bindings/clock/qcom,gcc-apq8084.h - - dt-bindings/reset/qcom,gcc-apq8084.h - - dt-bindings/clock/qcom,gcc-ipq4019.h - - dt-bindings/clock/qcom,gcc-ipq6018.h - - dt-bindings/reset/qcom,gcc-ipq6018.h - - dt-bindings/clock/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) - - dt-bindings/reset/qcom,gcc-ipq806x.h (qcom,gcc-ipq8064) - - dt-bindings/clock/qcom,gcc-msm8939.h - - dt-bindings/clock/qcom,gcc-msm8953.h - - dt-bindings/reset/qcom,gcc-msm8939.h - - dt-bindings/clock/qcom,gcc-msm8660.h - - dt-bindings/reset/qcom,gcc-msm8660.h - - dt-bindings/clock/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) - - dt-bindings/reset/qcom,gcc-msm8974.h (qcom,gcc-msm8226 and qcom,gcc-msm8974) - - dt-bindings/clock/qcom,gcc-mdm9607.h - - dt-bindings/clock/qcom,gcc-mdm9615.h - - dt-bindings/reset/qcom,gcc-mdm9615.h - - dt-bindings/clock/qcom,gcc-sdm660.h (qcom,gcc-sdm630 and qcom,gcc-sdm660) + Common bindings for Qualcomm global clock control module which supports + the clocks, resets and power domains. properties: - compatible: - enum: - - qcom,gcc-apq8084 - - qcom,gcc-ipq4019 - - qcom,gcc-ipq6018 - - qcom,gcc-ipq8064 - - qcom,gcc-mdm9607 - - qcom,gcc-msm8226 - - qcom,gcc-msm8660 - - qcom,gcc-msm8916 - - qcom,gcc-msm8939 - - qcom,gcc-msm8953 - - qcom,gcc-msm8960 - - qcom,gcc-msm8974 - - qcom,gcc-msm8974pro - - qcom,gcc-msm8974pro-ac - - qcom,gcc-mdm9615 - - qcom,gcc-sdm630 - - qcom,gcc-sdm660 - '#clock-cells': const: 1 @@ -72,22 +32,11 @@ properties: Protected clock specifier list as per common clock binding. required: - - compatible - reg - '#clock-cells' - '#reset-cells' - '#power-domain-cells' -additionalProperties: false +additionalProperties: true -examples: - # Example for GCC for MSM8960: - - | - clock-controller@900000 { - compatible = "qcom,gcc-msm8960"; - reg = <0x900000 0x4000>; - #clock-cells = <1>; - #reset-cells = <1>; - #power-domain-cells = <1>; - }; ...
Split qcom,gcc.yaml to common and specific schema to use it as a template for schema that needs to use the gcc bindings and require to add additional bindings. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com> --- .../bindings/clock/qcom,gcc-other.yaml | 76 +++++++++++++++++++ .../devicetree/bindings/clock/qcom,gcc.yaml | 59 +------------- 2 files changed, 80 insertions(+), 55 deletions(-) create mode 100644 Documentation/devicetree/bindings/clock/qcom,gcc-other.yaml