lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221023121222.5fe4a743@jic23-huawei>
Date:   Sun, 23 Oct 2022 12:12:22 +0100
From:   Jonathan Cameron <jic23@...nel.org>
To:     Marcus Folkesson <marcus.folkesson@...il.com>
Cc:     Mitja Spes <mitja@...av.com>, Lars-Peter Clausen <lars@...afoo.de>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>,
        Lee Jones <lee.jones@...aro.org>,
        Mark Brown <broonie@...nel.org>,
        Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>,
        Tomasz Duszynski <tduszyns@...il.com>,
        linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI
 speed to value limited

On Fri, 21 Oct 2022 17:32:21 +0200
Marcus Folkesson <marcus.folkesson@...il.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@...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 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.
Hi Marcus,

I'm not following what you are commenting on.. Perhaps give more
detail?

Thanks,

Jonathan

> 
> Best regards,
> Marcus Folkesson

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ