Re: [PATCH 6/6] iio: adc: ltc2497: enable line-frequency rejection on LTC2493
From: Jonathan Cameron
Date: Sat Oct 17 2026 - 23:30:40 EST
On Fri, 09 Oct 2026 11:43:39 +0300
Andrei Stancovici via B4 Relay <devnull+andrei.stancovici.analog.com@xxxxxxxxxx> wrote:
> From: Andrei Stancovici <andrei.stancovici@xxxxxxxxxx>
>
> The LTC2493 carries the same second configuration byte as the LTC2499,
> with identical FA/FB line-rejection semantics and the same per-rejection
> conversion times (50Hz-only being the longest at 163.5ms). The generic
> filter_mode infrastructure is already implemented in the core and enabled
> for the LTC2499. Enable the same flag for the LTC2493.
>
> Tested on live LTC2493 hardware connected through an IIO network backend:
> all three modes are selectable; conversion times are respected; voltage
> and temperature reads succeed in each mode with no -EIO.
>
> Datasheet: https://www.analog.com/media/en/technical-documentation/data-sheets/2493fe.pdf
> Signed-off-by: Andrei Stancovici <andrei.stancovici@xxxxxxxxxx>
> ---
> drivers/iio/adc/ltc2497.c | 1 +
> drivers/iio/adc/ltc2497.h | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ltc2497.c b/drivers/iio/adc/ltc2497.c
> index 0df2ad9b3243..d668a81f1ff7 100644
> --- a/drivers/iio/adc/ltc2497.c
> +++ b/drivers/iio/adc/ltc2497.c
> @@ -195,6 +195,7 @@ static const struct ltc2497_chip_info ltc2497_info[] = {
> .name = "ltc2493",
> .has_temp = true,
> .has_speed_mode = true,
> + .has_rejection_mode = true,
I can't see a reason not do combine this with previous patch.
> .four_channel = true,
> },
> [TYPE_LTC2497] = {
> diff --git a/drivers/iio/adc/ltc2497.h b/drivers/iio/adc/ltc2497.h
> index 34ea62c2a4bc..af939e57e1f8 100644
> --- a/drivers/iio/adc/ltc2497.h
> +++ b/drivers/iio/adc/ltc2497.h
> @@ -50,7 +50,7 @@ struct ltc2497_chip_info {
> u32 resolution;
> bool has_temp;
> bool has_speed_mode; /* SPD bit in the 2nd config byte (LTC2499/LTC2493) */
> - bool has_rejection_mode; /* FA/FB bits in the 2nd config byte (LTC2499) */
> + bool has_rejection_mode; /* FA/FB bits in the 2nd config byte (LTC2499/LTC2493) */
Particularly as reduces churn here.
> bool four_channel; /* 4 inputs (LTC2493) instead of 16 */
> };
>
>