aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/ltc2496.c
diff options
context:
space:
mode:
authorCiprian Regus <ciprian.regus@analog.com>2022-09-16 17:09:22 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2022-09-21 18:42:54 +0100
commit1695c52a1260aee2a33e29add1adca6433d5eac7 (patch)
tree3287ce86320627550dd8a401ad6ab75b3c25d704 /drivers/iio/adc/ltc2496.c
parent2187cfeb362678dae2f6235b20a6ef658836b3d4 (diff)
downloadlinux-1695c52a1260aee2a33e29add1adca6433d5eac7.tar.gz
drivers: iio: adc: ltc2497: Rename the LTC2499 iio device
Set the iio device's name based on the chip used for the LTC2499 only. The most common way for IIO clients to interact with a device is to address it based on it's name. By using the dev_name() function, the name will be set based on a i2c_client's kobj name, which has the format i2c_instance-i2c_address (1-0076 for example). This is not ideal, since it makes a requirement for userspace to have knowledge about the hardware connections of the device. The name field is set to NULL for the LTC2497 and LTC2496, so that the old name can kept as it is, since changing it will result in an ABI breakage. Signed-off-by: Ciprian Regus <ciprian.regus@analog.com> Link: https://lore.kernel.org/r/20220916140922.2506248-6-ciprian.regus@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/ltc2496.c')
-rw-r--r--drivers/iio/adc/ltc2496.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/ltc2496.c b/drivers/iio/adc/ltc2496.c
index bf89d5ae19af..2593fa4322eb 100644
--- a/drivers/iio/adc/ltc2496.c
+++ b/drivers/iio/adc/ltc2496.c
@@ -89,6 +89,7 @@ static void ltc2496_remove(struct spi_device *spi)
static const struct ltc2497_chip_info ltc2496_info = {
.resolution = 16,
+ .name = NULL,
};
static const struct of_device_id ltc2496_of_match[] = {