[PATCH 0/9] dt-bindings: pinctrl: imx: use minItems

Peng Fan (OSS) posted 9 patches 3 years, 8 months ago
.../devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.yaml    | 1 +
.../devicetree/bindings/pinctrl/fsl,imx8mm-pinctrl.yaml   | 1 +
.../devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml   | 1 +
.../devicetree/bindings/pinctrl/fsl,imx8mp-pinctrl.yaml   | 1 +
.../devicetree/bindings/pinctrl/fsl,imx8mq-pinctrl.yaml   | 1 +
.../devicetree/bindings/pinctrl/fsl,imx8ulp-pinctrl.yaml  | 1 +
.../devicetree/bindings/pinctrl/fsl,imx93-pinctrl.yaml    | 2 +-
.../devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml      | 8 ++++----
8 files changed, 11 insertions(+), 5 deletions(-)
[PATCH 0/9] dt-bindings: pinctrl: imx: use minItems
Posted by Peng Fan (OSS) 3 years, 8 months ago
From: Peng Fan <peng.fan@nxp.com>

There are many warnings when do dtbs_check: fsl,pins are too long,
so add minItems to address that.

Peng Fan (9):
  dt-bindings: pinctrl: imx8mm: use minItems for fsl,pins
  dt-bindings: pinctrl: imx8mn: use minItems for fsl,pins
  dt-bindings: pinctrl: imx8mq: use minItems for fsl,pins
  dt-bindings: pinctrl: imx8mp: use minItems for fsl,pins
  dt-bindings: pinctrl: imx8ulp: use minItems for fsl,pins
  dt-bindings: pinctrl: imx93: use minItems for fsl,pins
  dt-bindings: pinctrl: imx: scu: use minItems for fsl,pins
  dt-bindings: pinctrl: imx: scu: correct example
  dt-bindings: pinctrl: imx7d: use minItems for fsl,pins

 .../devicetree/bindings/pinctrl/fsl,imx7d-pinctrl.yaml    | 1 +
 .../devicetree/bindings/pinctrl/fsl,imx8mm-pinctrl.yaml   | 1 +
 .../devicetree/bindings/pinctrl/fsl,imx8mn-pinctrl.yaml   | 1 +
 .../devicetree/bindings/pinctrl/fsl,imx8mp-pinctrl.yaml   | 1 +
 .../devicetree/bindings/pinctrl/fsl,imx8mq-pinctrl.yaml   | 1 +
 .../devicetree/bindings/pinctrl/fsl,imx8ulp-pinctrl.yaml  | 1 +
 .../devicetree/bindings/pinctrl/fsl,imx93-pinctrl.yaml    | 2 +-
 .../devicetree/bindings/pinctrl/fsl,scu-pinctrl.yaml      | 8 ++++----
 8 files changed, 11 insertions(+), 5 deletions(-)

-- 
2.25.1
Re: [PATCH 0/9] dt-bindings: pinctrl: imx: use minItems
Posted by Rob Herring 3 years, 8 months ago
On Sat, Jul 23, 2022 at 05:43:26PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> There are many warnings when do dtbs_check: fsl,pins are too long,
> so add minItems to address that.

A single cell is not valid though, right?

This particular property is problematic because each entry depending 
on the platform has different number of cells (5, 6, etc.). A single 
cell (minItems: 1) is not valid though, right?

There's a fix in dtschema min branch which should fix the warnings. 
Unfortunately, it just strips any bounds checking.

Rob
RE: [PATCH 0/9] dt-bindings: pinctrl: imx: use minItems
Posted by Peng Fan 3 years, 8 months ago
> Subject: Re: [PATCH 0/9] dt-bindings: pinctrl: imx: use minItems
> 
> On Sat, Jul 23, 2022 at 05:43:26PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > There are many warnings when do dtbs_check: fsl,pins are too long, so
> > add minItems to address that.
> 
> A single cell is not valid though, right?
> 
> This particular property is problematic because each entry depending on the
> platform has different number of cells (5, 6, etc.). A single cell (minItems: 1)
> is not valid though, right?
> 
> There's a fix in dtschema min branch which should fix the warnings.
> Unfortunately, it just strips any bounds checking.
Just fetch dtschema and rerun, no warning anymore.
Regards,
Peng.
> 
> Rob
RE: [PATCH 0/9] dt-bindings: pinctrl: imx: use minItems
Posted by Peng Fan 3 years, 8 months ago
> Subject: Re: [PATCH 0/9] dt-bindings: pinctrl: imx: use minItems
> 
> On Sat, Jul 23, 2022 at 05:43:26PM +0800, Peng Fan (OSS) wrote:
> > From: Peng Fan <peng.fan@nxp.com>
> >
> > There are many warnings when do dtbs_check: fsl,pins are too long, so
> > add minItems to address that.
> 
> A single cell is not valid though, right?
> 
> This particular property is problematic because each entry depending on the
> platform has different number of cells (5, 6, etc.). A single cell (minItems: 1)
> is not valid though, right?

I thought no maxItems means no limitation on maxItems (:
Then I should add maxItems.
> 
> There's a fix in dtschema min branch which should fix the warnings.
> Unfortunately, it just strips any bounds checking.

ok, let me update dtschema to rerun the dtbs_check.
Thanks,
Peng.
> 
> Rob