提交 45e70bc7 编写于 作者: M Mitja Spes 提交者: sanglipeng

iio: pressure: ms5611: changed hardcoded SPI speed to value limited

stable inclusion
from stable-v5.10.156
commit 67a75a9480fc4f73465a90e6a5e5ee12e9de4d39
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MCG1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=67a75a9480fc4f73465a90e6a5e5ee12e9de4d39

--------------------------------

commit 741cec30 upstream.

Don't hardcode the ms5611 SPI speed, limit it instead.
Signed-off-by: NMitja Spes <mitja@lxnav.com>
Fixes: c0644160 ("iio: pressure: add support for MS5611 pressure and temperature sensor")
Link: https://lore.kernel.org/r/20221021135827.1444793-3-mitja@lxnav.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Nsanglipeng <sanglipeng1@jd.com>
上级 ca4a5724
......@@ -94,7 +94,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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册