All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcus Folkesson <marcus.folkesson@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Mitja Spes" <mitja@lxnav.com>,
	"Lars-Peter Clausen" <lars@metafoo.de>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Andy Shevchenko" <andy.shevchenko@gmail.com>,
	"Lee Jones" <lee.jones@linaro.org>,
	"Mark Brown" <broonie@kernel.org>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Tomasz Duszynski" <tduszyns@gmail.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited
Date: Mon, 24 Oct 2022 11:05:42 +0200	[thread overview]
Message-ID: <Y1ZVZpOgq8XkeCF1@gmail.com> (raw)
In-Reply-To: <20221023121222.5fe4a743@jic23-huawei>

[-- Attachment #1: Type: text/plain, Size: 1464 bytes --]

Hi Jonathan,

On Sun, Oct 23, 2022 at 12:12:22PM +0100, Jonathan Cameron wrote:
> On Fri, 21 Oct 2022 17:32:21 +0200
> Marcus Folkesson <marcus.folkesson@gmail.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@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 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?

Sorry for being unclear.
However, I must have thought wrong, this is good as it takes the speedlimit set
in e.g. devicetree into account.


> 
> Thanks,
> 
> Jonathan
> 
> > 
> > Best regards,
> > Marcus Folkesson
> 

Best regards,
Marcus Folkesson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-10-24  9:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 13:58 [PATCH v2 0/3] ms5611 sensor value bug fix; dt-binding fix Mitja Spes
2022-10-21 13:58 ` [PATCH v2 1/3] iio: pressure: ms5611: fixed value compensation bug Mitja Spes
2022-10-23 11:06   ` Jonathan Cameron
2022-10-24  6:37     ` Mitja Špes
2022-10-21 13:58 ` [PATCH v2 2/3] iio: pressure: ms5611: changed hardcoded SPI speed to value limited Mitja Spes
2022-10-21 15:32   ` Marcus Folkesson
2022-10-23 11:10     ` Jonathan Cameron
2022-10-24  6:46       ` Mitja Špes
2022-10-23 11:12     ` Jonathan Cameron
2022-10-24  9:05       ` Marcus Folkesson [this message]
2022-10-21 13:58 ` [PATCH v2 3/3] dt-bindings: iio: pressure: meas,ms5611: add max SPI frequency to the example Mitja Spes
2022-10-21 14:08   ` Krzysztof Kozlowski
2022-10-23 11:14     ` Jonathan Cameron
2022-10-29 11:40 ` [PATCH v2 0/3] ms5611 sensor value bug fix; dt-binding fix Jonathan Cameron

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=Y1ZVZpOgq8XkeCF1@gmail.com \
    --to=marcus.folkesson@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitja@lxnav.com \
    --cc=robh+dt@kernel.org \
    --cc=tduszyns@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.