public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <mike.looijmans@topic.nl>
To: Md Shofiqul Islam <shofiqtest@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
	andy@kernel.org
Subject: Re: [PATCH 3/3] iio: adc: ti-ads1298: Don't enable internal test signal during init
Date: Thu, 7 May 2026 07:25:01 +0200	[thread overview]
Message-ID: <ad8e2ad0-8d20-4b96-a7e1-a23a4bb9cc72@topic.nl> (raw)
In-Reply-To: <20260506181508.6813-4-shofiqtest@gmail.com>

On 5/6/26 20:15, Md Shofiqul Islam wrote:
> The driver was enabling the internal test signal (INT_TEST), double
> amplitude (TEST_AMP), and fast frequency (TEST_FREQ_FAST) bits in
> CONFIG2 during initialization. These bits activate an internal square
> wave generator intended for device testing and calibration, not normal
> ECG operation.
>
> While the test signal does not affect channel measurements unless the
> channel MUX is explicitly set to route it (MUX = 101), enabling the
> test signal generator unnecessarily increases power consumption and is
> inappropriate for a medical ADC driver in normal operation.
>
> Keep only the RESERVED bit which the datasheet requires to always be
> written as 1.

This boils down to just leaving the register at its default value. In that 
case, I'd suggest removing this completely.

>
> Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
> ---
>   drivers/iio/adc/ti-ads1298.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/adc/ti-ads1298.c b/drivers/iio/adc/ti-ads1298.c
> index 186bda3087..360dfd2fc8 100644
> --- a/drivers/iio/adc/ti-ads1298.c
> +++ b/drivers/iio/adc/ti-ads1298.c
> @@ -615,12 +615,9 @@ static int ads1298_init(struct iio_dev *indio_dev)
>   	if (!indio_dev->name)
>   		return -ENOMEM;
>   
> -	/* Enable internal test signal, double amplitude, double frequency */
> +	/* CONFIG2: reserved bit must always be written as 1 per datasheet */
>   	ret = regmap_write(priv->regmap, ADS1298_REG_CONFIG2,
> -			   ADS1298_MASK_CONFIG2_RESERVED |
> -			   ADS1298_MASK_CONFIG2_INT_TEST |
> -			   ADS1298_MASK_CONFIG2_TEST_AMP |
> -			   ADS1298_MASK_CONFIG2_TEST_FREQ_FAST);
> +			   ADS1298_MASK_CONFIG2_RESERVED);
>   	if (ret)
>   		return ret;
>   


-- 
Mike Looijmans
System Expert

TOPIC Embedded Products B.V.
Materiaalweg 4, 5681 RJ Best
The Netherlands

T: +31 (0) 499 33 69 69
E: mike.looijmans@topic.nl
W: www.topic.nl




      reply	other threads:[~2026-05-07  5:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-06 18:15 [PATCH 0/3] iio: adc: ti-ads1298: Three driver cleanups Md Shofiqul Islam
2026-05-06 18:15 ` [PATCH 1/3] iio: adc: ti-ads1298: Add parentheses around macro parameter Md Shofiqul Islam
2026-05-07  5:21   ` mike.looijmans
2026-05-06 18:15 ` [PATCH 2/3] iio: adc: ti-ads1298: Fix incorrect timeout comment Md Shofiqul Islam
2026-05-07  5:19   ` mike.looijmans
2026-05-06 18:15 ` [PATCH 3/3] iio: adc: ti-ads1298: Don't enable internal test signal during init Md Shofiqul Islam
2026-05-07  5:25   ` mike.looijmans [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=ad8e2ad0-8d20-4b96-a7e1-a23a4bb9cc72@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=shofiqtest@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