[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221019125254.952588-2-mitja@lxnav.com>
Date: Wed, 19 Oct 2022 14:52:51 +0200
From: Mitja Spes <mitja@...av.com>
To: linux-iio@...r.kernel.org, Jonathan Cameron <jic23@...nel.org>
Cc: Mitja Spes <mitja@...av.com>, Lars-Peter Clausen <lars@...afoo.de>,
Rob Herring <robh+dt@...nel.org>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Tomasz Duszynski <tduszyns@...il.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited
Don't hardcode the ms5611 SPI speed, limit it instead.
Signed-off-by: Mitja Spes <mitja@...av.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
Powered by blists - more mailing lists