Re: [RFC PATCH] dt-bindings: can: convert tcan4x5x.txt to DT schema
From: Rob Herring (Arm)
Date: Mon Nov 04 2024 - 05:22:57 EST
On Mon, 04 Nov 2024 09:56:15 +0100, Sean Nyekjaer wrote:
> Convert binding doc tcan4x5x.txt to yaml.
>
> Signed-off-by: Sean Nyekjaer <sean@xxxxxxxxxx>
> ---
>
> Can we somehow reference bosch,mram-cfg from the bosch,m_can.yaml?
> I have searched for yaml files that tries the same, but it's usually
> includes a whole node.
>
> I have also tried:
> $ref: /schema/bosch,m_can.yaml#/properties/bosch,mram-cfg
>
> Any hints to share a property?
>
> .../devicetree/bindings/net/can/tcan4x5x.txt | 48 ---------
> .../bindings/net/can/ti,tcan4x5x.yaml | 97 +++++++++++++++++++
> 2 files changed, 97 insertions(+), 48 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt
> create mode 100644 Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.yaml: properties:bosch,mram-cfg: 'anyOf' conditional failed, one must be fixed:
'description' is a dependency of '$ref'
'bosch,m_can.yaml#' does not match 'types.yaml#/definitions/'
hint: A vendor property needs a $ref to types.yaml
'bosch,m_can.yaml#' does not match '^#/(definitions|\\$defs)/'
hint: A vendor property can have a $ref to a a $defs schema
hint: Vendor specific properties must have a type and description unless they have a defined, common suffix.
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.example.dtb: can@0: bosch,mram-cfg: [0, 0, 0, 16, 0, 0, 1, 1] is not of type 'object'
from schema $id: http://devicetree.org/schemas/net/can/ti,tcan4x5x.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/can/ti,tcan4x5x.example.dtb: can@0: bosch,mram-cfg: [0, 0, 0, 16, 0, 0, 1, 1] is not of type 'object'
from schema $id: http://devicetree.org/schemas/net/can/ti,tcan4x5x.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20241104085616.469862-1-sean@xxxxxxxxxx
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
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 after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.