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

iio:ad5446: Add support for the ad5300/ad5310/ad5320

The ad5300/ad5310/ad5320 is a family of single channel DACs with a SPI interface
similar to the ad5601/ad5611/ad5621 but use a different shift factor for the
data word.

While we are at it also reorder the device part numbers in the ad5446 driver
Kconfig to be ordered alphabetically.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
2fafbce2 ce56ade6

+21 -3
+3 -3
drivers/iio/dac/Kconfig
··· 59 59 tristate "Analog Devices AD5446 and similar single channel DACs driver" 60 60 depends on (SPI_MASTER || I2C) 61 61 help 62 - Say yes here to build support for Analog Devices AD5602, AD5612, AD5622, 62 + Say yes here to build support for Analog Devices AD5300, AD5310, AD5320, 63 63 AD5444, AD5446, AD5450, AD5451, AD5452, AD5453, AD5512A, AD5541A, AD5542A, 64 - AD5543, AD5553, AD5601, AD5611, AD5620, AD5621, AD5640, AD5660, AD5662 65 - DACs. 64 + AD5543, AD5553, AD5601, AD5602, AD5611, AD5612, AD5620, AD5621, AD5622, 65 + AD5640, AD5660, AD5662 DACs. 66 66 67 67 To compile this driver as a module, choose M here: the 68 68 module will be called ad5446.
+18
drivers/iio/dac/ad5446.c
··· 321 321 * parts are supported here. 322 322 */ 323 323 enum ad5446_supported_spi_device_ids { 324 + ID_AD5300, 325 + ID_AD5310, 326 + ID_AD5320, 324 327 ID_AD5444, 325 328 ID_AD5446, 326 329 ID_AD5450, ··· 344 341 }; 345 342 346 343 static const struct ad5446_chip_info ad5446_spi_chip_info[] = { 344 + [ID_AD5300] = { 345 + .channel = AD5446_CHANNEL_POWERDOWN(8, 16, 4), 346 + .write = ad5446_write, 347 + }, 348 + [ID_AD5310] = { 349 + .channel = AD5446_CHANNEL_POWERDOWN(10, 16, 2), 350 + .write = ad5446_write, 351 + }, 352 + [ID_AD5320] = { 353 + .channel = AD5446_CHANNEL_POWERDOWN(12, 16, 0), 354 + .write = ad5446_write, 355 + }, 347 356 [ID_AD5444] = { 348 357 .channel = AD5446_CHANNEL(12, 16, 2), 349 358 .write = ad5446_write, ··· 433 418 }; 434 419 435 420 static const struct spi_device_id ad5446_spi_ids[] = { 421 + {"ad5300", ID_AD5300}, 422 + {"ad5310", ID_AD5310}, 423 + {"ad5320", ID_AD5320}, 436 424 {"ad5444", ID_AD5444}, 437 425 {"ad5446", ID_AD5446}, 438 426 {"ad5450", ID_AD5450},