public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Guillaume Stols <gstols@baylibre.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	 Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Greg Kroah-Hartman <gregkh@suse.de>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jonathan Cameron <jic23@cam.ac.uk>,
	jstephan@baylibre.com, dlechner@baylibre.com
Subject: Re: [PATCH v3] iio: adc: ad7606: remove frstdata check for serial mode
Date: Wed, 03 Jul 2024 12:42:31 +0200	[thread overview]
Message-ID: <fabaaa9d7be4193a2bfb5a0476fdcf1ce3117c58.camel@gmail.com> (raw)
In-Reply-To: <20240702-cleanup-ad7606-v3-1-18d5ea18770e@baylibre.com>

On Tue, 2024-07-02 at 12:52 +0000, Guillaume Stols wrote:
> The current implementation attempts to recover from an eventual glitch
> in the clock by checking frstdata state after reading the first
> channel's sample: If frstdata is low, it will reset the chip and
> return -EIO.
> 
> This will only work in parallel mode, where frstdata pin is set low
> after the 2nd sample read starts.
> 
> For the serial mode, according to the datasheet, "The FRSTDATA output
> returns to a logic low following the 16th SCLK falling edge.", thus
> after the Xth pulse, X being the number of bits in a sample, the check
> will always be true, and the driver will not work at all in serial
> mode if frstdata(optional) is defined in the devicetree as it will
> reset the chip, and return -EIO every time read_sample is called.
> 
> Hence, this check must be removed for serial mode.
> 
> Fixes: b9618c0cacd7 ("staging: IIO: ADC: New driver for AD7606/AD7606-
> 6/AD7606-4")
> 
> Signed-off-by: Guillaume Stols <gstols@baylibre.com>
> ---

Reviewed-by: Nuno Sa <nuno.sa@analog.com>



  reply	other threads:[~2024-07-03 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 12:52 [PATCH v3] iio: adc: ad7606: remove frstdata check for serial mode Guillaume Stols
2024-07-03 10:42 ` Nuno Sá [this message]
2024-07-07 16:02 ` 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=fabaaa9d7be4193a2bfb5a0476fdcf1ce3117c58.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=dlechner@baylibre.com \
    --cc=gregkh@suse.de \
    --cc=gstols@baylibre.com \
    --cc=jic23@cam.ac.uk \
    --cc=jic23@kernel.org \
    --cc=jstephan@baylibre.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox