On Tue, 2025-04-01 at 17:50 -0500, David Lechner wrote: > 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@xxxxxxxxxxxx> > --- Reviewed-by: Nuno Sá <nuno.sa@xxxxxxxxxx> > drivers/iio/adc/ad7380.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/iio/adc/ad7380.c b/drivers/iio/adc/ad7380.c > index > e5cd11fd7b1083af2082985f2c0226b1a97d600f..190ab411739feea32e189cb3ede925056ba4a87e > 100644 > --- a/drivers/iio/adc/ad7380.c > +++ b/drivers/iio/adc/ad7380.c > @@ -13,6 +13,7 @@ > * ad7381-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/ad7381-4.pdf > * ad7383/4-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/ad7383-4-ad7384-4.pdf > * ad7386/7/8-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/ad7386-4-7387-4-7388-4.pdf > + * ad7389-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/ad7389-4.pdf > * adaq4370-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4370-4.pdf > * adaq4380-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4380-4.pdf > * adaq4381-4 : > https://www.analog.com/media/en/technical-documentation/data-sheets/adaq4381-4.pdf > @@ -812,6 +813,21 @@ static const struct ad7380_chip_info ad7388_4_chip_info = { > .max_conversion_rate_hz = 4 * MEGA, > }; > > +static const struct ad7380_chip_info ad7389_4_chip_info = { > + .name = "ad7389-4", > + .channels = ad7380_4_channels, > + .offload_channels = ad7380_4_offload_channels, > + .num_channels = ARRAY_SIZE(ad7380_4_channels), > + .num_simult_channels = 4, > + .supplies = ad7380_supplies, > + .num_supplies = ARRAY_SIZE(ad7380_supplies), > + .internal_ref_only = true, > + .internal_ref_mv = AD7380_INTERNAL_REF_MV, > + .available_scan_masks = ad7380_4_channel_scan_masks, > + .timing_specs = &ad7380_4_timing, > + .max_conversion_rate_hz = 4 * MEGA, > +}; > + > static const struct ad7380_chip_info adaq4370_4_chip_info = { > .name = "adaq4370-4", > .channels = adaq4380_4_channels, > @@ -2051,6 +2067,7 @@ static const struct of_device_id ad7380_of_match_table[] = { > { .compatible = "adi,ad7386-4", .data = &ad7386_4_chip_info }, > { .compatible = "adi,ad7387-4", .data = &ad7387_4_chip_info }, > { .compatible = "adi,ad7388-4", .data = &ad7388_4_chip_info }, > + { .compatible = "adi,ad7389-4", .data = &ad7389_4_chip_info }, > { .compatible = "adi,adaq4370-4", .data = &adaq4370_4_chip_info }, > { .compatible = "adi,adaq4380-4", .data = &adaq4380_4_chip_info }, > { .compatible = "adi,adaq4381-4", .data = &adaq4381_4_chip_info }, > @@ -2072,6 +2089,7 @@ static const struct spi_device_id ad7380_id_table[] = { > { "ad7386-4", (kernel_ulong_t)&ad7386_4_chip_info }, > { "ad7387-4", (kernel_ulong_t)&ad7387_4_chip_info }, > { "ad7388-4", (kernel_ulong_t)&ad7388_4_chip_info }, > + { "ad7389-4", (kernel_ulong_t)&ad7389_4_chip_info }, > { "adaq4370-4", (kernel_ulong_t)&adaq4370_4_chip_info }, > { "adaq4380-4", (kernel_ulong_t)&adaq4380_4_chip_info }, > { "adaq4381-4", (kernel_ulong_t)&adaq4381_4_chip_info }, >