2021-11-10 00:12:48

by Pratyush Yadav

[permalink] [raw]
Subject: [PATCH v3 0/3] Add bindings for peripheral-specific SPI controller properties

Hi,

This series adds bindings for peripheral-specific SPI controller properties.
See patch 1 for more info on the motivations behind this.

This is the best approach that I came up with with my limited knowledge
of JSON schema. It has some limitations that are mentioned in patch 1. I
don't know of any better ways to model this. Suggestions are welcome!

Changes in v3:
- s/slave/peripheral/g
- Drop the | on description.
- Drop the compatible property.

Changes in v2:
- Move other subnode properties listed in spi-controller.yaml to
spi-slave-props.yaml
- Move the Cadence controller-specific properties out of
spi-slave-props.yaml. They will be added in a separate file.
- Add a reference to spi-slave-props.yaml in spi-controller.yaml.
- Update description.

Pratyush Yadav (3):
spi: dt-bindings: add schema listing peripheral-specific properties
spi: dt-bindings: cdns,qspi-nor: Move peripheral-specific properties
out
dt-bindings: mtd: spi-nor: Add a reference to
spi-peripheral-props.yaml

.../bindings/mtd/jedec,spi-nor.yaml | 3 +-
.../spi/cdns,qspi-nor-peripheral-props.yaml | 42 +++++++++
.../bindings/spi/cdns,qspi-nor.yaml | 33 -------
.../bindings/spi/spi-controller.yaml | 69 +-------------
.../bindings/spi/spi-peripheral-props.yaml | 89 +++++++++++++++++++
5 files changed, 135 insertions(+), 101 deletions(-)
create mode 100644 Documentation/devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml
create mode 100644 Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml

--
2.33.1.835.ge9e5ba39a7


2021-11-10 00:12:48

by Pratyush Yadav

[permalink] [raw]
Subject: [PATCH v3 3/3] dt-bindings: mtd: spi-nor: Add a reference to spi-peripheral-props.yaml

The spi-peripheral-props.yaml schema contains peripheral-specific
properties for SPI controllers that should be present in the peripheral
node. Add a reference to that so its constraints are followed.

additionalProperties: false cannot be used since it marks the controller
properties as unknown. Use unevaluatedProperties: false instead. This
has the side effect of allowing extra properties that are not specified
in the schema. The alternative is to list all the controller properties
in this schema but that would mean every peripheral binding would have
to repeat the same set of properties for each controller.

Signed-off-by: Pratyush Yadav <[email protected]>

---

Changes in v3:
- s/slave/peripheral/g

Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
index ed590d7c6e37..39421f7233e4 100644
--- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
@@ -11,6 +11,7 @@ maintainers:

allOf:
- $ref: "mtd.yaml#"
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
@@ -88,7 +89,7 @@ patternProperties:
"^otp(-[0-9]+)?$":
type: object

-additionalProperties: false
+unevaluatedProperties: false

examples:
- |
--
2.33.1.835.ge9e5ba39a7

2021-11-18 22:23:53

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v3 3/3] dt-bindings: mtd: spi-nor: Add a reference to spi-peripheral-props.yaml

On Tue, Nov 09, 2021 at 11:49:11PM +0530, Pratyush Yadav wrote:
> The spi-peripheral-props.yaml schema contains peripheral-specific
> properties for SPI controllers that should be present in the peripheral
> node. Add a reference to that so its constraints are followed.
>
> additionalProperties: false cannot be used since it marks the controller
> properties as unknown. Use unevaluatedProperties: false instead. This
> has the side effect of allowing extra properties that are not specified
> in the schema. The alternative is to list all the controller properties
> in this schema but that would mean every peripheral binding would have
> to repeat the same set of properties for each controller.
>
> Signed-off-by: Pratyush Yadav <[email protected]>
>
> ---
>
> Changes in v3:
> - s/slave/peripheral/g
>
> Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Rob Herring <[email protected]>

2021-11-29 18:11:58

by Pratyush Yadav

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add bindings for peripheral-specific SPI controller properties

Hi Rob,

On 09/11/21 11:49PM, Pratyush Yadav wrote:
> Hi,
>
> This series adds bindings for peripheral-specific SPI controller properties.
> See patch 1 for more info on the motivations behind this.
>
> This is the best approach that I came up with with my limited knowledge
> of JSON schema. It has some limitations that are mentioned in patch 1. I
> don't know of any better ways to model this. Suggestions are welcome!

Do you plan to take this series through your tree or should I poke Mark
about it?

>
> Changes in v3:
> - s/slave/peripheral/g
> - Drop the | on description.
> - Drop the compatible property.
>
> Changes in v2:
> - Move other subnode properties listed in spi-controller.yaml to
> spi-slave-props.yaml
> - Move the Cadence controller-specific properties out of
> spi-slave-props.yaml. They will be added in a separate file.
> - Add a reference to spi-slave-props.yaml in spi-controller.yaml.
> - Update description.
>
> Pratyush Yadav (3):
> spi: dt-bindings: add schema listing peripheral-specific properties
> spi: dt-bindings: cdns,qspi-nor: Move peripheral-specific properties
> out
> dt-bindings: mtd: spi-nor: Add a reference to
> spi-peripheral-props.yaml
>
> .../bindings/mtd/jedec,spi-nor.yaml | 3 +-
> .../spi/cdns,qspi-nor-peripheral-props.yaml | 42 +++++++++
> .../bindings/spi/cdns,qspi-nor.yaml | 33 -------
> .../bindings/spi/spi-controller.yaml | 69 +-------------
> .../bindings/spi/spi-peripheral-props.yaml | 89 +++++++++++++++++++
> 5 files changed, 135 insertions(+), 101 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/spi/cdns,qspi-nor-peripheral-props.yaml
> create mode 100644 Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml
>
> --
> 2.33.1.835.ge9e5ba39a7
>

--
Regards,
Pratyush Yadav
Texas Instruments Inc.

2021-11-29 22:32:23

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add bindings for peripheral-specific SPI controller properties

On Mon, Nov 29, 2021 at 11:39:35PM +0530, Pratyush Yadav wrote:
> On 09/11/21 11:49PM, Pratyush Yadav wrote:

> > This is the best approach that I came up with with my limited knowledge
> > of JSON schema. It has some limitations that are mentioned in patch 1. I
> > don't know of any better ways to model this. Suggestions are welcome!

> Do you plan to take this series through your tree or should I poke Mark
> about it?

I'd expect to take it through my tree but please allow a reasonable time
for reviews...


Attachments:
(No filename) (514.00 B)
signature.asc (488.00 B)
Download all attachments

2021-11-30 09:36:59

by Pratyush Yadav

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add bindings for peripheral-specific SPI controller properties

On 29/11/21 06:15PM, Mark Brown wrote:
> On Mon, Nov 29, 2021 at 11:39:35PM +0530, Pratyush Yadav wrote:
> > On 09/11/21 11:49PM, Pratyush Yadav wrote:
>
> > > This is the best approach that I came up with with my limited knowledge
> > > of JSON schema. It has some limitations that are mentioned in patch 1. I
> > > don't know of any better ways to model this. Suggestions are welcome!
>
> > Do you plan to take this series through your tree or should I poke Mark
> > about it?
>
> I'd expect to take it through my tree but please allow a reasonable time
> for reviews...

Sure, thanks. I just wanted to make sure this series didn't fall through
the cracks if there was some confusion on who is supposed to pick it up.

--
Regards,
Pratyush Yadav
Texas Instruments Inc.

2021-12-01 18:35:05

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Add bindings for peripheral-specific SPI controller properties

On Tue, 9 Nov 2021 23:49:08 +0530, Pratyush Yadav wrote:
> This series adds bindings for peripheral-specific SPI controller properties.
> See patch 1 for more info on the motivations behind this.
>
> This is the best approach that I came up with with my limited knowledge
> of JSON schema. It has some limitations that are mentioned in patch 1. I
> don't know of any better ways to model this. Suggestions are welcome!
>
> [...]

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/3] spi: dt-bindings: add schema listing peripheral-specific properties
commit: 8762b07c95c18fbbe1c6b3eb1e8e686091c346b5
[2/3] spi: dt-bindings: cdns,qspi-nor: Move peripheral-specific properties out
commit: b6bdc6e043906c70e949b2747772e6aa1d36f2a3
[3/3] dt-bindings: mtd: spi-nor: Add a reference to spi-peripheral-props.yaml
commit: e9d7c323cfbbd07c365a419b4ce3dc2f161442c7

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark