Message ID | d8fff247-d3ce-79f0-6d0b-dcce44457681@gmail.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | auxdisplay: Add support for the Titanmec TM1628 7 segment display controller | expand |
On Sat, 19 Feb 2022 14:17:54 +0100, Heiner Kallweit wrote: > Add a YAML schema binding for TM1628 auxdisplay > (7/11-segment LED) controller. > > This patch is partially based on previous RFC work from > Andreas Färber <afaerber@suse.de>. > > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> > --- > .../bindings/auxdisplay/titanmec,tm1628.yaml | 82 +++++++++++++++++++ > 1 file changed, 82 insertions(+) > create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13): yamllint warnings/errors: ./Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml:12:5: [warning] wrong indentation: expected 6 but found 4 (indentation) dtschema/dtc warnings/errors: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: 'maintainers' is a required property hint: Metaschema for devicetree binding documentation from schema $id: http://devicetree.org/meta-schemas/base.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: 'additionalProperties' is a required property hint: A schema without a "$ref" to another schema must define all properties and use "additionalProperties" from schema $id: http://devicetree.org/meta-schemas/base.yaml# ./Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: $id: relative path/filename doesn't match actual path or filename expected: http://devicetree.org/schemas/auxdisplay/titanmec,tm1628.yaml# /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: ignoring, error in schema: Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.example.dt.yaml:0:0: /example-0/spi/led-controller@0: failed to match any schema with compatible: ['titanmec,tm1628'] doc reference errors (make refcheckdocs): See https://patchwork.ozlabs.org/patch/1595016 This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1. If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date: pip3 install dtschema --upgrade Please check and re-submit.
On 21.02.2022 03:36, Rob Herring wrote: > On Sat, 19 Feb 2022 14:17:54 +0100, Heiner Kallweit wrote: >> Add a YAML schema binding for TM1628 auxdisplay >> (7/11-segment LED) controller. >> >> This patch is partially based on previous RFC work from >> Andreas Färber <afaerber@suse.de>. >> >> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> >> --- >> .../bindings/auxdisplay/titanmec,tm1628.yaml | 82 +++++++++++++++++++ >> 1 file changed, 82 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml >> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > yamllint warnings/errors: > ./Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml:12:5: [warning] wrong indentation: expected 6 but found 4 (indentation) > > dtschema/dtc warnings/errors: > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: 'maintainers' is a required property > hint: Metaschema for devicetree binding documentation > from schema $id: http://devicetree.org/meta-schemas/base.yaml# > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: 'additionalProperties' is a required property > hint: A schema without a "$ref" to another schema must define all properties and use "additionalProperties" > from schema $id: http://devicetree.org/meta-schemas/base.yaml# > ./Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: $id: relative path/filename doesn't match actual path or filename > expected: http://devicetree.org/schemas/auxdisplay/titanmec,tm1628.yaml# > /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml: ignoring, error in schema: > Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.example.dt.yaml:0:0: /example-0/spi/led-controller@0: failed to match any schema with compatible: ['titanmec,tm1628'] > > doc reference errors (make refcheckdocs): > > See https://patchwork.ozlabs.org/patch/1595016 > > This check can fail if there are any dependencies. The base for a patch > series is generally the most recent rc1. > > If you already ran 'make dt_binding_check' and didn't see the above > error(s), then make sure 'yamllint' is installed and dt-schema is up to > date: > > pip3 install dtschema --upgrade > > Please check and re-submit. > Thanks for the feedback. Will check and consider it in v2.
diff --git a/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml new file mode 100644 index 000000000..d9cbbc950 --- /dev/null +++ b/Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml @@ -0,0 +1,82 @@ +# SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/leds/titanmec,tm1628.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Titan Micro Electronics TM1628 LED controller + +properties: + compatible: + enum: + - titanmec,tm1628 + + reg: + maxItems: 1 + + grid: + description: + Mapping of display digit position to grid number. + This implicitly defines the display size. + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 1 + maxItems: 7 + + segment-mapping: + description: + Mapping of 7 segment display segments A-G to bit numbers 1-12. + $ref: /schemas/types.yaml#/definitions/uint8-array + minItems: 7 + maxItems: 7 + + "#address-cells": + const: 2 + + "#size-cells": + const: 0 + +required: + - compatible + - reg + +patternProperties: + "^.*@[1-7],([1-9]|1[0-6])$": + type: object + description: | + Properties for a single LED. + + properties: + reg: + description: | + 1-based grid number, followed by 1-based segment bit number. + maxItems: 1 + + required: + - reg + +examples: + - | + #include <dt-bindings/leds/common.h> + + spi { + #address-cells = <1>; + #size-cells = <0>; + + led-controller@0 { + compatible = "titanmec,tm1628"; + reg = <0>; + spi-3-wire; + spi-lsb-first; + spi-max-frequency = <500000>; + grid = /bits/ 8 <4 3 2 1>; + segment-mapping = /bits/ 8 <4 5 6 1 2 3 7>; + #address-cells = <2>; + #size-cells = <0>; + + alarmn@5,4 { + reg = <5 4>; + function = LED_FUNCTION_ALARM; + }; + }; + }; +...
Add a YAML schema binding for TM1628 auxdisplay (7/11-segment LED) controller. This patch is partially based on previous RFC work from Andreas Färber <afaerber@suse.de>. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- .../bindings/auxdisplay/titanmec,tm1628.yaml | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/auxdisplay/titanmec,tm1628.yaml