From: Jonathan Cameron <jic23@kernel.org>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: "Mitja Spes" <mitja@lxnav.com>,
"Lars-Peter Clausen" <lars@metafoo.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Andy Shevchenko" <andy.shevchenko@gmail.com>,
"Lee Jones" <lee.jones@linaro.org>,
"Mark Brown" <broonie@kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Tomasz Duszynski" <tduszyns@gmail.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited
Date: Sun, 23 Oct 2022 12:10:02 +0100 [thread overview]
Message-ID: <20221023121002.742bc48f@jic23-huawei> (raw)
In-Reply-To: <Y1K7hWKl0siEtaAl@gmail.com>
On Fri, 21 Oct 2022 17:32:21 +0200
Marcus Folkesson <marcus.folkesson@gmail.com> wrote:
> Hi Mitja,
>
> On Fri, Oct 21, 2022 at 03:58:21PM +0200, Mitja Spes wrote:
> > Don't hardcode the ms5611 SPI speed, limit it instead.
> >
> > Signed-off-by: Mitja Spes <mitja@lxnav.com>
Please give a fixes tag for this one as well.
The driver should never have been doing this.
Jonathan
> > ---
> > drivers/iio/pressure/ms5611_spi.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c
> > index 432e912096f4..a0a7205c9c3a 100644
> > --- a/drivers/iio/pressure/ms5611_spi.c
> > +++ b/drivers/iio/pressure/ms5611_spi.c
> > @@ -91,7 +91,7 @@ static int ms5611_spi_probe(struct spi_device *spi)
> > spi_set_drvdata(spi, indio_dev);
> >
> > spi->mode = SPI_MODE_0;
> > - spi->max_speed_hz = 20000000;
> > + spi->max_speed_hz = min(spi->max_speed_hz, 20000000U);
>
> max_speed_hz is a limit, and the max frequency the ms5611 support is
> 20MHz.
>
> Best regards,
> Marcus Folkesson
next prev parent reply other threads:[~2022-10-23 11:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 13:58 [PATCH v2 0/3] ms5611 sensor value bug fix; dt-binding fix Mitja Spes
2022-10-21 13:58 ` [PATCH v2 1/3] iio: pressure: ms5611: fixed value compensation bug Mitja Spes
2022-10-23 11:06 ` Jonathan Cameron
2022-10-24 6:37 ` Mitja Špes
2022-10-21 13:58 ` [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited Mitja Spes
2022-10-21 15:32 ` Marcus Folkesson
2022-10-23 11:10 ` Jonathan Cameron [this message]
2022-10-24 6:46 ` Mitja Špes
2022-10-23 11:12 ` Jonathan Cameron
2022-10-24 9:05 ` Marcus Folkesson
2022-10-21 13:58 ` [PATCH v2 3/3] dt-bindings: iio: pressure: meas,ms5611: add max SPI frequency to the example Mitja Spes
2022-10-21 14:08 ` Krzysztof Kozlowski
2022-10-23 11:14 ` Jonathan Cameron
2022-10-29 11:40 ` [PATCH v2 0/3] ms5611 sensor value bug fix; dt-binding fix Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221023121002.742bc48f@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=lee.jones@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcus.folkesson@gmail.com \
--cc=mitja@lxnav.com \
--cc=robh+dt@kernel.org \
--cc=tduszyns@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).