Skip to content

Commit 01437ab

Browse files
shofiqtestjic23
authored andcommitted
iio: adc: ti-ads1298: Remove unnecessary CONFIG2 write during init
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>
1 parent 5d7b3df commit 01437ab

1 file changed

Lines changed: 0 additions & 9 deletions

File tree

drivers/iio/adc/ti-ads1298.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -617,15 +617,6 @@ static int ads1298_init(struct iio_dev *indio_dev)
617617
if (!indio_dev->name)
618618
return -ENOMEM;
619619

620-
/* Enable internal test signal, double amplitude, double frequency */
621-
ret = regmap_write(priv->regmap, ADS1298_REG_CONFIG2,
622-
ADS1298_MASK_CONFIG2_RESERVED |
623-
ADS1298_MASK_CONFIG2_INT_TEST |
624-
ADS1298_MASK_CONFIG2_TEST_AMP |
625-
ADS1298_MASK_CONFIG2_TEST_FREQ_FAST);
626-
if (ret)
627-
return ret;
628-
629620
val = ADS1298_MASK_CONFIG3_RESERVED; /* Must write 1 always */
630621
if (!priv->reg_vref) {
631622
/* Enable internal reference */

0 commit comments

Comments
 (0)