2024-02-21 17:43:31

by Marco Felsch

[permalink] [raw]
Subject: [PATCH] dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

Make use of the common spi-peripheral-props.yaml to pull in the common
spi device properties and limit the spi-max-frequency to 10 MHz as this
is the max. frequency if VDDIO >= 1.62V.

Signed-off-by: Marco Felsch <[email protected]>
---
.../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml b/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml
index 1414ba9977c1..3c6fe74af0b8 100644
--- a/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml
+++ b/Documentation/devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml
@@ -22,6 +22,9 @@ properties:
vdd-supply: true
vddio-supply: true

+ spi-max-frequency:
+ maximum: 10000000
+
interrupts:
minItems: 1
maxItems: 2
@@ -33,7 +36,10 @@ required:
- compatible
- reg

-additionalProperties: false
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false

examples:
- |
--
2.39.2



2024-02-26 09:39:47

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

On 21/02/2024 18:43, Marco Felsch wrote:
> Make use of the common spi-peripheral-props.yaml to pull in the common
> spi device properties and limit the spi-max-frequency to 10 MHz as this
> is the max. frequency if VDDIO >= 1.62V.

The example uses i2c, so I would expect to see in commit msg explanation
which devices are SPI devices.

Also:
A nit, subject: drop second/last, redundant "binding". The "dt-bindings"
prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18



Best regards,
Krzysztof


2024-02-26 12:42:53

by Marco Felsch

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

On 24-02-26, Krzysztof Kozlowski wrote:
> On 21/02/2024 18:43, Marco Felsch wrote:
> > Make use of the common spi-peripheral-props.yaml to pull in the common
> > spi device properties and limit the spi-max-frequency to 10 MHz as this
> > is the max. frequency if VDDIO >= 1.62V.
>
> The example uses i2c, so I would expect to see in commit msg explanation
> which devices are SPI devices.

All listed devices can either operate in I2C or in SPI mode.

> Also:
> A nit, subject: drop second/last, redundant "binding". The "dt-bindings"
> prefix is already stating that these are bindings.
> See also:
> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

Will rephrase it if you want me to update the commit message.

Regards,
Marco

>
>
>
> Best regards,
> Krzysztof
>
>

2024-02-26 13:18:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

On 26/02/2024 13:40, Marco Felsch wrote:
> On 24-02-26, Krzysztof Kozlowski wrote:
>> On 21/02/2024 18:43, Marco Felsch wrote:
>>> Make use of the common spi-peripheral-props.yaml to pull in the common
>>> spi device properties and limit the spi-max-frequency to 10 MHz as this
>>> is the max. frequency if VDDIO >= 1.62V.
>>
>> The example uses i2c, so I would expect to see in commit msg explanation
>> which devices are SPI devices.
>
> All listed devices can either operate in I2C or in SPI mode.

Such information in commit msg would be enough.

with the changes:

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof


2024-02-27 19:24:54

by Jonathan Cameron

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

On Mon, 26 Feb 2024 14:18:00 +0100
Krzysztof Kozlowski <[email protected]> wrote:

> On 26/02/2024 13:40, Marco Felsch wrote:
> > On 24-02-26, Krzysztof Kozlowski wrote:
> >> On 21/02/2024 18:43, Marco Felsch wrote:
> >>> Make use of the common spi-peripheral-props.yaml to pull in the common
> >>> spi device properties and limit the spi-max-frequency to 10 MHz as this
> >>> is the max. frequency if VDDIO >= 1.62V.
> >>
> >> The example uses i2c, so I would expect to see in commit msg explanation
> >> which devices are SPI devices.
> >
> > All listed devices can either operate in I2C or in SPI mode.
>
> Such information in commit msg would be enough.
>
> with the changes:
>
> Reviewed-by: Krzysztof Kozlowski <[email protected]>
>
> Best regards,
> Krzysztof
>

Added the note whilst applying.

Applied to the togreg branch of iio.git and pushed out (briefly given
timing) as testing for 0-day to take a first look.

Thanks,

Jonathan

2024-02-27 21:52:34

by Marco Felsch

[permalink] [raw]
Subject: Re: [PATCH] dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

On 24-02-27, Jonathan Cameron wrote:
> On Mon, 26 Feb 2024 14:18:00 +0100
> Krzysztof Kozlowski <[email protected]> wrote:
>
> > On 26/02/2024 13:40, Marco Felsch wrote:
> > > On 24-02-26, Krzysztof Kozlowski wrote:
> > >> On 21/02/2024 18:43, Marco Felsch wrote:
> > >>> Make use of the common spi-peripheral-props.yaml to pull in the common
> > >>> spi device properties and limit the spi-max-frequency to 10 MHz as this
> > >>> is the max. frequency if VDDIO >= 1.62V.
> > >>
> > >> The example uses i2c, so I would expect to see in commit msg explanation
> > >> which devices are SPI devices.
> > >
> > > All listed devices can either operate in I2C or in SPI mode.
> >
> > Such information in commit msg would be enough.
> >
> > with the changes:
> >
> > Reviewed-by: Krzysztof Kozlowski <[email protected]>
> >
> > Best regards,
> > Krzysztof
> >
>
> Added the note whilst applying.

Thanks a lot :)

Regards,
Marco

> Applied to the togreg branch of iio.git and pushed out (briefly given
> timing) as testing for 0-day to take a first look.
>
> Thanks,
>
> Jonathan
>