diff mbox series

[3/3] doc: iio: pressure: ms5611: added max SPI frequency setting to the example

Message ID 20221019125254.952588-3-mitja@lxnav.com (mailing list archive)
State Superseded
Headers show
Series [1/3] iio: pressure: ms5611: fixed value compensation bug | expand

Commit Message

Mitja Špes Oct. 19, 2022, 12:52 p.m. UTC
Added max SPI frequency setting to the example. It is now honored by the
driver.

Signed-off-by: Mitja Spes <mitja@lxnav.com>
---
 Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski Oct. 19, 2022, 3:49 p.m. UTC | #1
On 19/10/2022 08:52, Mitja Spes wrote:
> Added max SPI frequency setting to the example. It is now honored by the
> driver.

Use subject prefixes matching the subsystem (git log --oneline -- ...).

Please use scripts/get_maintainers.pl to get a list of necessary people
and lists to CC.  It might happen, that command when run on an older
kernel, gives you outdated entries.  Therefore please be sure you base
your patches on recent Linux kernel.

> 
> Signed-off-by: Mitja Spes <mitja@lxnav.com>
> ---
>  Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml
> index 4f06707450bf..08bd06e6dabe 100644
> --- a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml
> +++ b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml
> @@ -52,6 +52,7 @@ examples:
>              compatible = "meas,ms5611";
>              reg = <0>;
>              vdd-supply = <&ldo_3v3_gnss>;
> +            spi-max-frequency = <20000000>;

Whether it is honored by driver it matters less. More important is how
hardware can handle it. This should be included in the bindings/properties.

Best regards,
Krzysztof
Mitja Špes Oct. 20, 2022, 5:31 a.m. UTC | #2
On Wed, Oct 19, 2022 at 3:23 PM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
>
> On Wed, Oct 19, 2022 at 3:55 PM Mitja Spes <mitja@lxnav.com> wrote:
> >
> > Added max SPI frequency setting to the example. It is now honored by the
> > driver.
>
> Is it possible to add a constraint here? So the schema validator will
> issue the warning / error if the speed is too high.

The constraint is already there:
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/iio/pressure/meas%2Cms5611.yaml
```
spi-max-frequency:
    maximum: 20000000
```

But in any case the patch 2/3 limits the max frequency.

Kind regards,
Mitja Spes
Mitja Špes Oct. 20, 2022, 5:40 a.m. UTC | #3
On Wed, Oct 19, 2022 at 5:49 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:

> Use subject prefixes matching the subsystem (git log --oneline -- ...).

Will do.

> Whether it is honored by driver it matters less. More important is how
> hardware can handle it. This should be included in the bindings/properties.

The hardware handles frequencies up to 20MHz. That constraint is already
written in meas,ms5611.yaml.
What my patch 2 does is allow the user to set a lower frequency and the patch
3 just emphasises that in the example.

Kind regards,
Mitja
Krzysztof Kozlowski Oct. 20, 2022, noon UTC | #4
On 20/10/2022 01:40, Mitja Špes wrote:
> On Wed, Oct 19, 2022 at 5:49 PM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
> 
>> Use subject prefixes matching the subsystem (git log --oneline -- ...).
> 
> Will do.
> 
>> Whether it is honored by driver it matters less. More important is how
>> hardware can handle it. This should be included in the bindings/properties.
> 
> The hardware handles frequencies up to 20MHz. That constraint is already
> written in meas,ms5611.yaml.
> What my patch 2 does is allow the user to set a lower frequency and the patch
> 3 just emphasises that in the example.

Then I am not sure whether it is worth changing. This is just an
example. Old value is correct.

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml
index 4f06707450bf..08bd06e6dabe 100644
--- a/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml
+++ b/Documentation/devicetree/bindings/iio/pressure/meas,ms5611.yaml
@@ -52,6 +52,7 @@  examples:
             compatible = "meas,ms5611";
             reg = <0>;
             vdd-supply = <&ldo_3v3_gnss>;
+            spi-max-frequency = <20000000>;
         };
     };
 ...