]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dt-bindings: phy-common-props: ensure protocol-names are unique
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 11 Jan 2026 09:39:32 +0000 (11:39 +0200)
committerVinod Koul <vkoul@kernel.org>
Wed, 14 Jan 2026 12:46:05 +0000 (18:16 +0530)
commit01fc2215940c20bbb22fa196a331ec9d50e45452
tree8a4540feb52f28432b38d8f5df6f0be171cb9ea4
parent33c79865c7d3cc84705ed133c101794902e60269
dt-bindings: phy-common-props: ensure protocol-names are unique

Rob Herring points out that "The default for .*-names is the entries
don't have to be unique.":
https://lore.kernel.org/linux-phy/20251204155219.GA1533839-robh@kernel.org/

Let's use uniqueItems: true to make sure the schema enforces this. It
doesn't make sense in this case to have duplicate properties for the
same SerDes protocol.

Note that this can only be done with the $defs + $ref pattern as
established by the previous commit. When the tx-p2p-microvolt-names
constraints were expressed directly under "properties", it would have
been validated by the string-array meta-schema, which does not support
the 'uniqueItems' keyword as can be seen below.

properties:tx-p2p-microvolt-names: Additional properties are not allowed ('uniqueItems' was unexpected)
        from schema $id: http://devicetree.org/meta-schemas/string-array.yaml

Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260111093940.975359-4-vladimir.oltean@nxp.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Documentation/devicetree/bindings/phy/phy-common-props.yaml