dt-validate issues with the oneOf/$ref/incomplete node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Short story:

If the dt schema file has a property with using oneOf/anyOf of several $ref references and the corresponding device node is incomplete and has status = "disabled", then the dt-validate would still validate the node against these schemas (and fail the validation as the node is incomplete).


Long story:


For quite a while I have been stumbling with the issue during refactoring the display/msm/mdss schema.

The schema had the following part:

patternProperties:
  "^dsi-phy@[1-9a-f][0-9a-f]*$":
    oneOf:
      - $ref: dsi-phy-28nm.yaml#
      - $ref: dsi-phy-20nm.yaml#
      - $ref: dsi-phy-14nm.yaml#
      - $ref: dsi-phy-10nm.yaml#
      - $ref: dsi-phy-7nm.yaml#

Validating existing DT files against just 'DT_SCHEMA_FILES=display/msm/mdss' would work w/o errors. Validating against 'DT_SCHEMA_FILES=display/msm/dsi' would also validate w/o any issues. However specifying 'DT_SCHEMA_FILES=display/msm' (thus enabling both mdss.yaml and dsi-phy-*.yaml) would cause a long stream of "mdss@ae00000: dsi-phy@ae96400: 'oneOf' conditional failed, one must be fixed:" errors.

For quite a while I failed to understand what was causing the issue until I found that the errors are reported against the _disabled_ device nodes which miss e.g. several -supply nodes. If I added the corresponding missing supplies (or removed the requirement to have the supply from corresponding .yaml) then the file would validate against mdss.yaml + dsi*yaml combo.

Thus I suppose something goes wrong with the validation of disabled nodes against oneOf conditionals.

--
With best wishes
Dmitry



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux