Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Dumitru Ceclan via B4 Relay
	<devnull+dumitru.ceclan.analog.com@kernel.org>
Cc: dumitru.ceclan@analog.com, Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dumitru Ceclan <mitrutzceclan@gmail.com>
Subject: Re: [PATCH v3 5/5] iio: adc: ad7173: Fix sampling frequency setting
Date: Sun, 2 Jun 2024 13:22:04 +0100	[thread overview]
Message-ID: <20240602132204.385d689a@jic23-huawei> (raw)
In-Reply-To: <20240530-ad7173-fixes-v3-5-b85f33079e18@analog.com>

On Thu, 30 May 2024 15:07:53 +0300
Dumitru Ceclan via B4 Relay <devnull+dumitru.ceclan.analog.com@kernel.org> wrote:

> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
> 
> This patch fixes two issues regarding the sampling frequency setting:
> -The attribute was set as per device, not per channel. As such, when
>  setting the sampling frequency, the configuration was always done for
>  the slot 0, and the correct configuration was applied on the next
>  channel configuration call by the LRU mechanism.
> -The LRU implementation does not take into account external settings of
>  the slot registers. When setting the sampling frequency directly to a
>  slot register in write_raw(), there is no guarantee that other channels
>  were not also using that slot and now incorrectly retain their config
>  as live.
> 
> Set the sampling frequency attribute as separate in the channel templates.
> Do not set the sampling directly to the slot register in write_raw(),
> just mark the config as not live and let the LRU mechanism handle it.
> As the reg variable is no longer used, remove it.
> 
> Fixes: 8eb903272f75 ("iio: adc: ad7173: add AD7173 driver")
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
Applied to the fixes-togreg branch of iio.git.

Thanks,

Jonathan

      reply	other threads:[~2024-06-02 12:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 12:07 [PATCH v3 0/5] AD7173 fixes Dumitru Ceclan via B4 Relay
2024-05-30 12:07 ` [PATCH v3 1/5] iio: adc: ad7173: fix buffers enablement for ad7176-2 Dumitru Ceclan via B4 Relay
2024-06-02 12:19   ` Jonathan Cameron
2024-05-30 12:07 ` [PATCH v3 2/5] iio: adc: ad7173: Add ad7173_device_info names Dumitru Ceclan via B4 Relay
2024-05-30 12:07 ` [PATCH v3 3/5] iio: adc: ad7173: Remove index from temp channel Dumitru Ceclan via B4 Relay
2024-05-30 12:07 ` [PATCH v3 4/5] iio: adc: ad7173: Clear append status bit Dumitru Ceclan via B4 Relay
2024-06-02 12:21   ` Jonathan Cameron
2024-05-30 12:07 ` [PATCH v3 5/5] iio: adc: ad7173: Fix sampling frequency setting Dumitru Ceclan via B4 Relay
2024-06-02 12:22   ` Jonathan Cameron [this message]

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=20240602132204.385d689a@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=devnull+dumitru.ceclan.analog.com@kernel.org \
    --cc=dumitru.ceclan@analog.com \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitrutzceclan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox