Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: dac: ad5686: Add support for AD5337

AD5337 belongs to the same family as the AD5338.

The difference is that the AD5337 has 8-bit precision instead of 10-bit.

Add support for the AD5337 chip in the driver.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20221130182632.3856675-2-festevam@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Fabio Estevam and committed by
Jonathan Cameron
58c26300 611370fe

+14 -4
+4 -4
drivers/iio/dac/Kconfig
··· 162 162 depends on I2C 163 163 select AD5686 164 164 help 165 - Say yes here to build support for Analog Devices AD5311R, AD5338R, 166 - AD5671R, AD5673R, AD5675R, AD5677R, AD5691R, AD5692R, AD5693, AD5693R, 167 - AD5694, AD5694R, AD5695R, AD5696, and AD5696R Digital to Analog 168 - converters. 165 + Say yes here to build support for Analog Devices AD5311R, AD5337, 166 + AD5338R, AD5671R, AD5673R, AD5675R, AD5677R, AD5691R, AD5692R, AD5693, 167 + AD5693R, AD5694, AD5694R, AD5695R, AD5696, and AD5696R Digital to 168 + Analog converters. 169 169 170 170 To compile this driver as a module, choose M here: the module will be 171 171 called ad5696.
+7
drivers/iio/dac/ad5686.c
··· 258 258 259 259 DECLARE_AD5693_CHANNELS(ad5310r_channels, 10, 2); 260 260 DECLARE_AD5693_CHANNELS(ad5311r_channels, 10, 6); 261 + DECLARE_AD5338_CHANNELS(ad5337r_channels, 8, 8); 261 262 DECLARE_AD5338_CHANNELS(ad5338r_channels, 10, 6); 262 263 DECLARE_AD5676_CHANNELS(ad5672_channels, 12, 4); 263 264 DECLARE_AD5679_CHANNELS(ad5674r_channels, 12, 4); ··· 283 282 .int_vref_mv = 2500, 284 283 .num_channels = 1, 285 284 .regmap_type = AD5693_REGMAP, 285 + }, 286 + [ID_AD5337R] = { 287 + .channels = ad5337r_channels, 288 + .int_vref_mv = 2500, 289 + .num_channels = 2, 290 + .regmap_type = AD5686_REGMAP, 286 291 }, 287 292 [ID_AD5338R] = { 288 293 .channels = ad5338r_channels,
+1
drivers/iio/dac/ad5686.h
··· 54 54 enum ad5686_supported_device_ids { 55 55 ID_AD5310R, 56 56 ID_AD5311R, 57 + ID_AD5337R, 57 58 ID_AD5338R, 58 59 ID_AD5671R, 59 60 ID_AD5672R,
+2
drivers/iio/dac/ad5696-i2c.c
··· 72 72 73 73 static const struct i2c_device_id ad5686_i2c_id[] = { 74 74 {"ad5311r", ID_AD5311R}, 75 + {"ad5337r", ID_AD5337R}, 75 76 {"ad5338r", ID_AD5338R}, 76 77 {"ad5671r", ID_AD5671R}, 77 78 {"ad5673r", ID_AD5673R}, ··· 93 92 94 93 static const struct of_device_id ad5686_of_match[] = { 95 94 { .compatible = "adi,ad5311r" }, 95 + { .compatible = "adi,ad5337r" }, 96 96 { .compatible = "adi,ad5338r" }, 97 97 { .compatible = "adi,ad5671r" }, 98 98 { .compatible = "adi,ad5675r" },