[PATCH v2 0/3] iio: adc: ltc2497: add LTC2493 support and line-frequency rejection
From: Andrei Stancovici via B4 Relay
Date: Thu Oct 22 2026 - 06:05:20 EST
This series adds LTC2493 support to the ltc2497 driver, and adds FA/FB
line-frequency rejection for the LTC2499 and the LTC2493.
It includes:
- the LTC2493 device-tree binding,
- FA/FB line-frequency rejection (50Hz, 60Hz, or both) exposed via
filter_mode, implemented in the core and enabled for the LTC2499,
- LTC2493 support in the driver: 4 single-ended inputs or 2 differential
pairs, 24-bit result, same command format as the LTC2499, the internal
PTAT temperature channel, the 2x conversion speed mode exposed via
sampling_frequency, and the same rejection selection.
The rejection patch also adjusts the conversion wait time for each
rejection mode. The 50Hz-only mode takes up to 163.5 ms at 1x, while the
previous fixed 150 ms delay only covered the default 50/60Hz mode.
Validated on a Raspberry Pi 4 running 7.3.0-rc4, over an IIO network
backend, with a DC1010A-A board (LTC2493), a DC1012A-A board (LTC2499)
and an LTC2497:
- LTC2493: 41/41 hardware tests passed,
- LTC2499: 36/36 hardware tests passed,
- LTC2497: 24/24 hardware tests passed,
- all LTC2493 rejection x speed combinations were exercised without
conversion or I2C errors.
LTC2496 was build-tested only because no LTC2496 hardware was available.
The source in this series matches the hardware-tested tree.
Signed-off-by: Andrei Stancovici <andrei.stancovici@xxxxxxxxxx>
---
Changes in v2:
- Restructured from six patches to three, following review from Nuno Sá
and Jonathan Cameron: the FA/FB rejection infrastructure comes first,
and the LTC2493 is then introduced complete in a single patch instead
of growing a chip_info entry over four of them.
- The input count is modelled as a number rather than a bool, so further
family members do not each add a branch (Jonathan Cameron).
- FA/FB is modelled as a 2-bit field rather than two independent flags,
with the mapping helper removed (Jonathan Cameron).
- Addressed the locking, comment and churn review on the FA/FB patch.
- Behaviour is unchanged, re-verified by hardware regression on all
three parts; see the validation summary above.
- Per-patch changelogs are under the --- of each patch.
- Link to v1: https://lore.kernel.org/r/20261009-submission-ltc2493-support-v1-v1-0-3dad1d4b152a@xxxxxxxxxx
---
Andrei Stancovici (3):
dt-bindings: iio: adc: lltc,ltc2497: add LTC2493 support
iio: adc: ltc2497: add FA/FB line-frequency rejection selection
iio: adc: ltc2497: add LTC2493 support
.../devicetree/bindings/iio/adc/lltc,ltc2497.yaml | 7 +
drivers/iio/adc/ltc2496.c | 1 +
drivers/iio/adc/ltc2497-core.c | 227 +++++++++++++++++----
drivers/iio/adc/ltc2497.c | 47 +++--
drivers/iio/adc/ltc2497.h | 31 ++-
5 files changed, 251 insertions(+), 62 deletions(-)
---
base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
change-id: 20261009-submission-ltc2493-support-v1-86449ede432d
Best regards,
--
Andrei Stancovici <andrei.stancovici@xxxxxxxxxx>