iio: adc: ad7124: move chip ID & name on the chip_info table
authorAlexandru Ardelean <alexandru.ardelean@analog.com>
Tue, 14 Jul 2020 05:11:11 +0000 (08:11 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 22 Jul 2020 13:36:05 +0000 (14:36 +0100)
commit951ad4700313984a45c95a33ec6abba6b3054525
tree065ca1690836d417f4bc6b442e27d70301921ec3
parent79233bdcf6138740e1cb054b580290576a407035
iio: adc: ad7124: move chip ID & name on the chip_info table

This change does the following:
* removes the SPI device table in favor of the OF device table
* adds 'name' && 'chip_id' fields to chip_info
* implements chip ID & silicon revision checking; the device ID for
  AD7124-4 is 0x0, so just checking that value can be useless;
  but at least the silicon revision isn't 0, so a non-zero value can be
  used to check that "a" device is on the SPI bus; it's probably the best
  way to narrow it down to one of the 2 AD7124 chip IDs

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7124.c