Re: [PATCH v2 net-next 03/10] dt-bindings: phy-common-props: ensure protocol-names are unique

From
Rob Herring (Arm) <robh@kernel.org>
Date
2026-01-06 18:22:59
Also in
linux-arm-kernel, linux-devicetree, linux-mediatek, linux-phy, lkml
Reply to
Vladimir Oltean, 2026-01-03
On Sat, 03 Jan 2026 23:03:56 +0200, Vladimir Oltean wrote:
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/ (local)

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>
---
v1->v2: patch is new

 Documentation/devicetree/bindings/phy/phy-common-props.yaml | 1 +
 1 file changed, 1 insertion(+)
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Thread (14 messages) 14 messages, 2 authors, last reply 2026-01-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help