Re: [PATCH v5 01/10] dt-bindings: soc: fsl: cpm_qe: Add TSA controller
From: Krzysztof Kozlowski <hidden>
Date: 2023-02-17 14:24:55
Also in:
alsa-devel, linux-arm-kernel, linux-devicetree, lkml
On 17/02/2023 14:50, Herve Codina wrote:
Hi Krzysztof, On Fri, 17 Feb 2023 10:14:48 +0100 Krzysztof Kozlowski [off-list ref] wrote:quoted
On 16/02/2023 14:42, Herve Codina wrote:quoted
Add support for the time slot assigner (TSA) available in some PowerQUICC SoC such as MPC885 or MPC866. Signed-off-by: Herve Codina <herve.codina@bootlin.com> --- .../bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml | 234 ++++++++++++++++++ include/dt-bindings/soc/fsl,tsa.h | 13 + 2 files changed, 247 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml create mode 100644 include/dt-bindings/soc/fsl,tsa.h[...]quoted
quoted
+ +patternProperties: + '^tdm@[0-1]$': + description: + The TDM managed by this controller + type: object + + additionalProperties: false + + properties: + reg: + minimum: 0 + maximum: 1 + description: + The TDM number for this TDM, 0 for TDMa and 1 for TDMb[...]quoted
quoted
+ + fsl,rx-frame-sync-delay-bits: + enum: [0, 1, 2, 3]maxItems: 1The property is an enum Why this maxItems value ?
Hm, it's an array, but you are right that enum forces dtschema to interpret it as scalar value, so your code is correct.
If I add the maxItems value, I've got some dt_binding_check errors:
/xxxx/bindings/soc/fsl/cpm_qe/fsl,cpm1-tsa.yaml:
patternProperties:^tdm@[0-1]$:properties:fsl,rx-frame-sync-delay-bits:
'enum' should not be valid under {'enum': ['const', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'minimum', 'maximum', 'multipleOf', 'pattern']}
hint: Scalar and array keywords cannot be mixed
from schema $id: http://devicetree.org/meta-schemas/keywords.yaml#Best regards, Krzysztof