mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/3] iio: adc: ltc2497: add LTC2493 support and line-frequency rejection
@ 2026-10-22  9:58 Andrei Stancovici via B4 Relay
  2026-10-22  9:58 ` [PATCH v2 1/3] dt-bindings: iio: adc: lltc,ltc2497: add LTC2493 support Andrei Stancovici via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andrei Stancovici via B4 Relay @ 2026-10-22  9:58 UTC (permalink / raw)
  To: Nuno Sá,
	Michael Hennerich, Jonathan Cameron, David Lechner,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Liam Beguin, Joshua Crofts
  Cc: linux, linux-iio, devicetree, linux-kernel, Andrei Stancovici,
	Conor Dooley

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@analog.com>
---
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@analog.com

---
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@analog.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-10-26  0:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-22  9:58 [PATCH v2 0/3] iio: adc: ltc2497: add LTC2493 support and line-frequency rejection Andrei Stancovici via B4 Relay
2026-10-22  9:58 ` [PATCH v2 1/3] dt-bindings: iio: adc: lltc,ltc2497: add LTC2493 support Andrei Stancovici via B4 Relay
2026-10-22 10:32   ` Nuno Sá
2026-10-22  9:58 ` [PATCH v2 2/3] iio: adc: ltc2497: add FA/FB line-frequency rejection selection Andrei Stancovici via B4 Relay
2026-10-22 10:32   ` Nuno Sá
2026-10-22  9:58 ` [PATCH v2 3/3] iio: adc: ltc2497: add LTC2493 support Andrei Stancovici via B4 Relay
2026-10-22 10:32   ` Nuno Sá
2026-10-26  0:46 ` [PATCH v2 0/3] iio: adc: ltc2497: add LTC2493 support and line-frequency rejection Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®