[PATCH v3 2/4] iio: adc: ltc2497: add support for LTC2495

From: Yusuf Alper Bilgin
Date: Thu Aug 14 2025 - 07:03:31 EST


Update the LTC2497 driver to also support the LTC2495.

Signed-off-by: Yusuf Alper Bilgin <y.alperbilgin@xxxxxxxxx>
---
drivers/iio/adc/ltc2497.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/iio/adc/ltc2497.c b/drivers/iio/adc/ltc2497.c
index eb9d521e86e54def0493ea0e81f63b37900c56a5..8f4665547b5b0d32084599f8557c40102c37a4ce 100644
--- a/drivers/iio/adc/ltc2497.c
+++ b/drivers/iio/adc/ltc2497.c
@@ -19,6 +19,7 @@
#include "ltc2497.h"

enum ltc2497_chip_type {
+ TYPE_LTC2495,
TYPE_LTC2497,
TYPE_LTC2499,
};
@@ -131,6 +132,10 @@ static void ltc2497_remove(struct i2c_client *client)
}

static const struct ltc2497_chip_info ltc2497_info[] = {
+ [TYPE_LTC2495] = {
+ .resolution = 16,
+ .name = "ltc2495",
+ },
[TYPE_LTC2497] = {
.resolution = 16,
.name = NULL,
@@ -142,6 +147,7 @@ static const struct ltc2497_chip_info ltc2497_info[] = {
};

static const struct i2c_device_id ltc2497_id[] = {
+ { "ltc2495", (kernel_ulong_t)&ltc2497_info[TYPE_LTC2495] },
{ "ltc2497", (kernel_ulong_t)&ltc2497_info[TYPE_LTC2497] },
{ "ltc2499", (kernel_ulong_t)&ltc2497_info[TYPE_LTC2499] },
{ }
@@ -149,6 +155,7 @@ static const struct i2c_device_id ltc2497_id[] = {
MODULE_DEVICE_TABLE(i2c, ltc2497_id);

static const struct of_device_id ltc2497_of_match[] = {
+ { .compatible = "lltc,ltc2495", .data = &ltc2497_info[TYPE_LTC2495] },
{ .compatible = "lltc,ltc2497", .data = &ltc2497_info[TYPE_LTC2497] },
{ .compatible = "lltc,ltc2499", .data = &ltc2497_info[TYPE_LTC2499] },
{ }

--
2.43.0