diff mbox series

dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding

Message ID 20240221174305.3423039-1-m.felsch@pengutronix.de (mailing list archive)
State Accepted
Headers show
Series dt-bindings: iio: gyroscope: bosch,bmg160: add spi-max-frequency binding | expand

Commit Message

Marco Felsch Feb. 21, 2024, 5:43 p.m. UTC
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 <m.felsch@pengutronix.de>
---
 .../devicetree/bindings/iio/gyroscope/bosch,bmg160.yaml   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Krzysztof Kozlowski Feb. 26, 2024, 9:01 a.m. UTC | #1
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
Marco Felsch Feb. 26, 2024, 12:40 p.m. UTC | #2
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
> 
>
Krzysztof Kozlowski Feb. 26, 2024, 1:18 p.m. UTC | #3
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 <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof
Jonathan Cameron Feb. 27, 2024, 7:23 p.m. UTC | #4
On Mon, 26 Feb 2024 14:18:00 +0100
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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 <krzysztof.kozlowski@linaro.org>
> 
> 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
Marco Felsch Feb. 27, 2024, 9:51 p.m. UTC | #5
On 24-02-27, Jonathan Cameron wrote:
> On Mon, 26 Feb 2024 14:18:00 +0100
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 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 <krzysztof.kozlowski@linaro.org>
> > 
> > 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
>
diff mbox series

Patch

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:
   - |