Re: [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> ---
>  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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux