From: Mitja Spes <mitja@lxnav.com>
To: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@kernel.org>
Cc: Mitja Spes <mitja@lxnav.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Tomasz Duszynski <tduszyns@gmail.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited
Date: Wed, 19 Oct 2022 14:52:51 +0200 [thread overview]
Message-ID: <20221019125254.952588-2-mitja@lxnav.com> (raw)
In-Reply-To: <20221019125254.952588-1-mitja@lxnav.com>
Don't hardcode the ms5611 SPI speed, limit it instead.
Signed-off-by: Mitja Spes <mitja@lxnav.com>
---
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 281b08398720..1b1e863783ec 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);
spi->bits_per_word = 8;
ret = spi_setup(spi);
if (ret < 0)
--
2.34.1
next prev parent reply other threads:[~2022-10-19 14:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 12:52 [PATCH 1/3] iio: pressure: ms5611: fixed value compensation bug Mitja Spes
2022-10-19 12:52 ` Mitja Spes [this message]
2022-10-19 12:52 ` [PATCH 3/3] doc: iio: pressure: ms5611: added max SPI frequency setting to the example Mitja Spes
2022-10-19 13:23 ` Andy Shevchenko
2022-10-20 5:31 ` Mitja Špes
2022-10-19 15:49 ` Krzysztof Kozlowski
2022-10-20 5:40 ` Mitja Špes
2022-10-20 12:00 ` Krzysztof Kozlowski
2022-10-19 13:24 ` [PATCH 1/3] iio: pressure: ms5611: fixed value compensation bug Andy Shevchenko
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=20221019125254.952588-2-mitja@lxnav.com \
--to=mitja@lxnav.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=tduszyns@gmail.com \
/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