Skip to content

Commit b8efa2a

Browse files
committed
iio: adc: ad7380: add ad7389-4
Add chip info for AD7389-4 to the ad7380 driver. This is essentially the same as ad7380-4 except that it is internal- reference-only instead of external-reference-only. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20250401-iio-ad7380-add-ad7389-4-v1-4-23d2568aa24f@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> (cherry picked from commit 98a0026)
1 parent 59af63c commit b8efa2a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

drivers/iio/adc/ad7380.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* ad7381-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7381-4.pdf
1414
* ad7383/4-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7383-4-ad7384-4.pdf
1515
* ad7386/7/8-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7386-4-7387-4-7388-4.pdf
16+
* ad7389-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/ad7389-4.pdf
1617
* adaq4370-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4370-4.pdf
1718
* adaq4380-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4380-4.pdf
1819
* adaq4381-4 : https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4381-4.pdf
@@ -815,6 +816,21 @@ static const struct ad7380_chip_info ad7388_4_chip_info = {
815816
.max_conversion_rate_hz = 4 * MEGA,
816817
};
817818

819+
static const struct ad7380_chip_info ad7389_4_chip_info = {
820+
.name = "ad7389-4",
821+
.channels = ad7380_4_channels,
822+
.offload_channels = ad7380_4_offload_channels,
823+
.num_channels = ARRAY_SIZE(ad7380_4_channels),
824+
.num_simult_channels = 4,
825+
.supplies = ad7380_supplies,
826+
.num_supplies = ARRAY_SIZE(ad7380_supplies),
827+
.internal_ref_only = true,
828+
.internal_ref_mv = AD7380_INTERNAL_REF_MV,
829+
.available_scan_masks = ad7380_4_channel_scan_masks,
830+
.timing_specs = &ad7380_4_timing,
831+
.max_conversion_rate_hz = 4 * MEGA,
832+
};
833+
818834
static const struct ad7380_chip_info adaq4370_4_chip_info = {
819835
.name = "adaq4370-4",
820836
.channels = adaq4380_4_channels,
@@ -2114,6 +2130,7 @@ static const struct of_device_id ad7380_of_match_table[] = {
21142130
{ .compatible = "adi,ad7386-4", .data = &ad7386_4_chip_info },
21152131
{ .compatible = "adi,ad7387-4", .data = &ad7387_4_chip_info },
21162132
{ .compatible = "adi,ad7388-4", .data = &ad7388_4_chip_info },
2133+
{ .compatible = "adi,ad7389-4", .data = &ad7389_4_chip_info },
21172134
{ .compatible = "adi,adaq4370-4", .data = &adaq4370_4_chip_info },
21182135
{ .compatible = "adi,adaq4380-4", .data = &adaq4380_4_chip_info },
21192136
{ .compatible = "adi,adaq4381-4", .data = &adaq4381_4_chip_info },
@@ -2135,6 +2152,7 @@ static const struct spi_device_id ad7380_id_table[] = {
21352152
{ "ad7386-4", (kernel_ulong_t)&ad7386_4_chip_info },
21362153
{ "ad7387-4", (kernel_ulong_t)&ad7387_4_chip_info },
21372154
{ "ad7388-4", (kernel_ulong_t)&ad7388_4_chip_info },
2155+
{ "ad7389-4", (kernel_ulong_t)&ad7389_4_chip_info },
21382156
{ "adaq4370-4", (kernel_ulong_t)&adaq4370_4_chip_info },
21392157
{ "adaq4380-4", (kernel_ulong_t)&adaq4380_4_chip_info },
21402158
{ "adaq4381-4", (kernel_ulong_t)&adaq4381_4_chip_info },

0 commit comments

Comments
 (0)