From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A020E4C043B for ; Wed, 6 May 2026 18:15:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778091322; cv=none; b=C/R/Q1bLhO21naJBlDJxNJ1q1cRVWs8ErwUVGfgjMLcSQoIoA2b03rjNDibBOVHeYoiomKnqKCTS5n23dqkEoT2vLZX/nCSfrGDWZLU9ayMQDV/S3f/ENUD+4B9iR+tTDrTbM248sHF3xBflmUOJkFxIhuInpPMe/al29RIgnOo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778091322; c=relaxed/simple; bh=KYHbEs1hFhbzdxRs3kjAitKOLVWL54iGr3ovFRvC3yk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nAYcZajH8I1DdnSxiKjOMgzA854OIF26xzpBjbchMnJ8oosNIZZCyxZyPjHmLsp4guYIspa70pQqDFX0g4KxAuzqcT4FpUG5qux9st2lsi08zJXvo2G/wT2TepiHJr8nvjkdqw4slMXyL/Y+y+5b/r+pXLSD8K9HoqkAr5DY0sg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=daIx9g0o; arc=none smtp.client-ip=209.85.167.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="daIx9g0o" Received: by mail-lf1-f43.google.com with SMTP id 2adb3069b0e04-5a0ff30b240so10011465e87.0 for ; Wed, 06 May 2026 11:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778091319; x=1778696119; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=urPJFirmQxK1PfI+Y4FpSbIT/Bsr9NE+HAChfqtMiKg=; b=daIx9g0on/PQSEE9MhzP8Nv9cyaaJuK8fgMwlUMPj8I1A+Vc6fOGB/hhbZq21D2wBy mXOrUzKqTu7gBpVCO3cNkxcZ5rLAYVpzP949GQqdNZMdZSz9ND6Tp+ATNa+RSZ5XvUCe Tqvd4vOtYYiw1rLq6lsQXJbRulJqxCfZwtJ1k3rflxRoEaq43gjbZlcM9pYOLOBFgPGt ivxwHkK/sorDqrbvl+pM4zd9JC6RlG/gel00HCDtTfvSG8IVlBjQRsYveSFHMmS6eVOT I/7bq5BsY8IKKE9J8uJVURXoHkZquzco7NPwKqptL7jIoRsAlHhQWHSR9rjD0feM3nr9 TZ6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778091319; x=1778696119; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=urPJFirmQxK1PfI+Y4FpSbIT/Bsr9NE+HAChfqtMiKg=; b=KwFsJTCTq/u9ErQ+OP7IRc+et8KPw56vWV4Jc5cQrd2+R6pTk3MG/Xsoy/u7NSUnsk M4qQyM3nhf82vqD29AG88CF0WXo1wYxiRZn7+O81tw5aghcA8wri76Utp2NP+yqLPPGk WXr9XNCanRkSqF5DLKTld6wTbPJzZhvJGxh2NjCcUT8DZuXOIFzI6//yuKQylP/iU3+5 GEo3dfyPxOwExtTLABf1uMzUddlqozZTmQ0SC4jvSv0B/UbXG4Lysu/R1hdZn7ViSXw0 ZvaCv1IA/GI3kXBPc+X1J/C8dNtciZzsGbmZsahnYBF6aR0LR2U4UzKBai2DKvp3S99P VV5Q== X-Forwarded-Encrypted: i=1; AFNElJ/aPC88h7thm7wOsWedRBumbyi5HBT0N1UKR2p8mISNDRbp46e4EJhvgRILIhu1aeIHpUJ+V+/iRp60e70=@vger.kernel.org X-Gm-Message-State: AOJu0YyexFm1P+hCqnX3p5zYkNe2DEBejpxJflP9R8gzhAbiQN8c88yf WpQoQtrnyIRA33oPspJfc0ZwbzVvGZSqD1dswGCzoZQm5nKF3J6Qy+YJ X-Gm-Gg: AeBDieuwCB4qYnpdfjVZp3U3362ZNV+T3gfP3eYvQ7jKu6DS+TGUPUSDTJcmwK7id/J Sd87aUEyVA4cMM0s0Lnp1fdFksjLAA/VmbBQfxGBE7V2qdvFhMozlMPwArgb0pFKYOa8YpEAGiM swpvnr8rA/yU5mhJuESngI5r61F+BkxHhNJjxkK1siZN+tRk7x9vAQChRhGY8Wsgbn+GvIU7x2E x2x/+tSQCPqW4LeMBy7hFpwSxLHgkofhagU9oUHmNMM2Wnf3Br6r8FAFO3QfpRjKw2Nl8mlDqFj EYmwwsBYG4O03/U6kgITP+WafLnoYXt9ExD5bD58Q+sNyO7KXixjVonsjYfT7uzUK9rwNeXq9ZB y2E9uHQ+k73I9cqfV9Ck/mCSeBgWOu3AfYBKJHevGje1ltxjVFa6NCc2Zu6RAuK9YTFRDD+WpGc Dmvq+MWIcTehhdK4VxWv5mG3E7c1n4Lg5eyLAzap1Q8KTsmggQ4oQY/ruObRK5I9bYtTDXbAVHj Ps= X-Received: by 2002:ac2:4e45:0:b0:5a8:6b96:9d10 with SMTP id 2adb3069b0e04-5a887cef69fmr972792e87.40.1778091318831; Wed, 06 May 2026 11:15:18 -0700 (PDT) Received: from Shofiq (87-92-218-151.rev.dnainternet.fi. [87.92.218.151]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5a85c341848sm5037123e87.65.2026.05.06.11.15.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2026 11:15:18 -0700 (PDT) From: Md Shofiqul Islam To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Md Shofiqul Islam , jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, mike.looijmans@topic.nl Subject: [PATCH 3/3] iio: adc: ti-ads1298: Don't enable internal test signal during init Date: Wed, 6 May 2026 21:15:06 +0300 Message-ID: <20260506181508.6813-4-shofiqtest@gmail.com> X-Mailer: git-send-email 2.54.0.windows.1 In-Reply-To: <20260506181508.6813-1-shofiqtest@gmail.com> References: <20260506181508.6813-1-shofiqtest@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Signed-off-by: Md Shofiqul Islam --- 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; -- 2.54.0.windows.1