[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231208202436.GA2627018-robh@kernel.org>
Date: Fri, 8 Dec 2023 14:24:36 -0600
From: Rob Herring <robh@...nel.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
James Clark <james.clark@....com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Mao Jinlong <quic_jinlmao@...cinc.com>,
Hao Zhang <quic_hazha@...cinc.com>,
Tao Zhang <quic_taozha@...cinc.com>,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH 1/3] dt-bindings: arm: coresight: restrict single port
subnodes
On Wed, Dec 06, 2023 at 12:53:30PM +0100, Krzysztof Kozlowski wrote:
> "in-ports" and "out-ports" with single "port" subnode should use
> "additionalProperties: false" to disallow any other properties mentioned
> by graph schema which are not applicable for this case, e.g.
> "address-cells".
The graph schema should already check this case with this subschema:
oneOf:
- required:
- port
- required:
- "#address-cells"
- "#size-cells"
However, I now see this would allow port and #address-cells if
#size-cells is omitted. (#address-cells is a dependency for
##size-cells, but not vice-versa because interrupt-controllers can have
##just #address-cells). Perhaps this should instead be:
oneOf:
- required:
- port
- anyOf:
- required:
- "#address-cells"
- required:
- "#size-cells"
We're missing a similar check on endpoint. Or I'm forgetting why I
didn't add it.
I suspect there are a lot more cases if we fixed these in the users.
Rob
Powered by blists - more mailing lists