Commit 37cd3c87 authored by Javier Arteaga's avatar Javier Arteaga Committed by Jonathan Cameron

iio: adc128s052: Add pin-compatible IDs

The datasheets for ADC122S021 and ADC124S021 list two more
pin-compatible alternatives for each device.

Add their IDs as compatible strings.
Suggested-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarJavier Arteaga <javier@emutex.com>
Signed-off-by: default avatarDan O'Donovan <dan@emutex.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 073a391c
* Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip * Texas Instruments' ADC128S052, ADC122S021 and ADC124S021 ADC chip
Required properties: Required properties:
- compatible: Should be "ti,adc128s052", "ti,adc122s021" or "ti,adc124s021" - compatible: Should be one of:
- "ti,adc128s052"
- "ti,adc122s021"
- "ti,adc122s051"
- "ti,adc122s101"
- "ti,adc124s021"
- "ti,adc124s051"
- "ti,adc124s101"
- reg: spi chip select number for the device - reg: spi chip select number for the device
- vref-supply: The regulator supply for ADC reference voltage - vref-supply: The regulator supply for ADC reference voltage
......
...@@ -186,15 +186,23 @@ static int adc128_remove(struct spi_device *spi) ...@@ -186,15 +186,23 @@ static int adc128_remove(struct spi_device *spi)
static const struct of_device_id adc128_of_match[] = { static const struct of_device_id adc128_of_match[] = {
{ .compatible = "ti,adc128s052", }, { .compatible = "ti,adc128s052", },
{ .compatible = "ti,adc122s021", }, { .compatible = "ti,adc122s021", },
{ .compatible = "ti,adc122s051", },
{ .compatible = "ti,adc122s101", },
{ .compatible = "ti,adc124s021", }, { .compatible = "ti,adc124s021", },
{ .compatible = "ti,adc124s051", },
{ .compatible = "ti,adc124s101", },
{ /* sentinel */ }, { /* sentinel */ },
}; };
MODULE_DEVICE_TABLE(of, adc128_of_match); MODULE_DEVICE_TABLE(of, adc128_of_match);
static const struct spi_device_id adc128_id[] = { static const struct spi_device_id adc128_id[] = {
{ "adc128s052", 0}, /* index into adc128_config */ { "adc128s052", 0 }, /* index into adc128_config */
{ "adc122s021", 1}, { "adc122s021", 1 },
{ "adc124s021", 2}, { "adc122s051", 1 },
{ "adc122s101", 1 },
{ "adc124s021", 2 },
{ "adc124s051", 2 },
{ "adc124s101", 2 },
{ } { }
}; };
MODULE_DEVICE_TABLE(spi, adc128_id); MODULE_DEVICE_TABLE(spi, adc128_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment