]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init
authorMd Shofiqul Islam <shofiqtest@gmail.com>
Sat, 9 May 2026 15:19:59 +0000 (18:19 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:38 +0000 (10:59 +0100)
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.

CONFIG2 defaults to having only the RESERVED bit set after reset, which
is the correct value for normal operation. Remove the write entirely
since it would just be writing the reset default value.

Suggested-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Md Shofiqul Islam <shofiqtest@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/ti-ads1298.c

index 69911b0cde84e772dde8930a3675a322961ae92b..579200e06cbd6c1e0c14a50a925bcf91add5ed6a 100644 (file)
@@ -617,15 +617,6 @@ static int ads1298_init(struct iio_dev *indio_dev)
        if (!indio_dev->name)
                return -ENOMEM;
 
-       /* Enable internal test signal, double amplitude, double frequency */
-       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);
-       if (ret)
-               return ret;
-
        val = ADS1298_MASK_CONFIG3_RESERVED; /* Must write 1 always */
        if (!priv->reg_vref) {
                /* Enable internal reference */