All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Crofts <crofts@kernel.org>
To: Rupesh Majhi <zoone.rupert@gmail.com>
Cc: "Andy Shevchenko" <andy@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Eddie James" <eajames@linux.ibm.com>,
	"Joel Stanley" <joel@jms.id.au>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Nuno Sá" <nuno.sa@analog.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sashiko <sashiko-bot@kernel.org>,
	"Paulius Zaleckas" <paulius.zaleckas@gmail.com>
Subject: Re: [PATCH 2/3] iio: pressure: dps310: reset the chip at probe
Date: Fri, 30 Oct 2026 09:19:07 +0100	[thread overview]
Message-ID: <20261030091907.0000709e@kernel.org> (raw)
In-Reply-To: <20261029220635.18816-3-zoone.rupert@gmail.com>

On Fri, 30 Oct 2026 00:06:34 +0200
Rupesh Majhi <zoone.rupert@gmail.com> wrote:

> The chip keeps its registers across a warm reboot, and probe changes
> only the shift bits in CFG_REG. A reboot during a FIFO capture leaves
> FIFO_EN set, so the ready bits never come and every raw read times
> out. The timeout reset does not clear it either, since the CFG_REG
> update that follows writes FIFO_EN back from the register cache.
> 
> Reset the chip first, as remove already does.
> 
> Fixes: 90f0d1016398 ("iio: pressure: dps310: read buffered samples from the hardware FIFO")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20260921183132.233136-1-zoone.rupert%40gmail.com
> Signed-off-by: Rupesh Majhi <zoone.rupert@gmail.com>
> ---
> Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
> 
>  drivers/iio/pressure/dps310.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c
> index b6aa5dbe2bcd..29778f25bb33 100644
> --- a/drivers/iio/pressure/dps310.c
> +++ b/drivers/iio/pressure/dps310.c
> @@ -1445,6 +1445,11 @@ static int dps310_probe(struct i2c_client *client)
>  	if (rc)
>  		return rc;
>  
> +	/* The chip keeps its state across a warm reboot */
> +	rc = dps310_reset_wait(data);
> +	if (rc)
> +		return rc;
> +
>  	rc = dps310_startup(data);
>  	if (rc)
>  		return rc;

Reviewed-by: Joshua Crofts <crofts@kernel.org>

-- 
Kind regards,
Joshua Crofts

  reply	other threads:[~2026-10-30  8:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-29 22:06 [PATCH 0/3] iio: pressure: dps310: fix input checks and resets Rupesh Majhi
2026-10-29 22:06 ` [PATCH 1/3] iio: pressure: dps310: reject a zero rate or oversampling ratio Rupesh Majhi
2026-10-30  8:17   ` Joshua Crofts
2026-10-29 22:06 ` [PATCH 2/3] iio: pressure: dps310: reset the chip at probe Rupesh Majhi
2026-10-30  8:19   ` Joshua Crofts [this message]
2026-10-29 22:06 ` [PATCH 3/3] iio: pressure: dps310: keep the user's settings across a timeout reset Rupesh Majhi
2026-10-30  8:22   ` Joshua Crofts

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=20261030091907.0000709e@kernel.org \
    --to=crofts@kernel.org \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=eajames@linux.ibm.com \
    --cc=jic23@kernel.org \
    --cc=joel@jms.id.au \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=paulius.zaleckas@gmail.com \
    --cc=sashiko-bot@kernel.org \
    --cc=zoone.rupert@gmail.com \
    /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.