False positive warnings regarding phandle-arrays?
Hi all,
running dtb_checks with current Linux git and dt-schema git, I get this warning:
DTC [C] arch/arm/boot/dts/renesas/r8a7790-lager.dtbarch/arm/boot/dts/renesas/r8a7790-lager.dtb: i2c-mux1 (i2c-demux-pinctrl): i2c-parent:0: [99, 100] is too long
from schema $id: http://devicetree.org/schemas/i2c/i2c-demux-pinctrl.yamlarch/arm/boot/dts/renesas/r8a7790-lager.dtb: i2c-mux1 (i2c-demux-pinctrl): i2c-parent: [[99, 100]] is too short
from schema $id: http://devicetree.org/schemas/i2c/i2c-demux-pinctrl.yaml
(and a couple of more like this in i2c-demux nodes)
This is how "i2c-parent" is described in the YAML file:
i2c-parent:
$ref: /schemas/types.yaml#/definitions/phandle-array
minItems: 2
items:
maxItems: 1
description:
List of phandles of I2C masters available for selection. The first one will be used as default.
where Rob added the constraints for the phandle-array with:
37534121c4e4 ("dt-bindings: Fix phandle-array constraints, again") 91f9a47ddb9d ("dt-bindings: i2c: mux: i2c-demux-pinctrl: Define "i2c-parent" constraints")
I think the DT describes it correctly:
i2cexio0: i2c-mux1 {
compatible = "i2c-demux-pinctrl";
i2c-parent = <&iic0>, <&i2c0>;
i2c-bus-name = "i2c-exio0";
#address-cells = <1>;
#size-cells = <0>;
};Is this a false positive because the checker cannot distinguish between two values with one cell and one value with two cells? I think a potential fix belongs to the checker ideally, but maybe I am wrong and need to annotate the DT?
Thank you for your help,
Wolfram