[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9IEK0T.R3JGMPI97ET21@gmail.com>
Date: Wed, 06 Aug 2025 11:03:45 +0200
From: Stefano Manni <stefano.manni@...il.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: lars@...afoo.de, Michael.Hennerich@...log.com, jic23@...nel.org,
dlechner@...libre.com, nuno.sa@...log.com, andy@...nel.org,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: adc: ad799x: add reference supply for ad7994
Hi Andy,
On mar, ago 5 2025 at 15:13:06 +02:00:00, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Tue, Aug 5, 2025 at 2:28 PM Stefano Manni
> <stefano.manni@...il.com> wrote:
>>
>> AD7994 supports the external reference voltage on pin REFIN.
>
> ...
>
>> - if ((st->id == ad7991) || (st->id == ad7995) ||
>> (st->id == ad7999)) {
>> + if ((st->id == ad7991) || (st->id == ad7995) ||
>> (st->id == ad7999)
>> + (st->id == ad7994)) {
>
> Instead of making this conditional longer and uglier, it is better to
> add a boolean field to chip_info and just check it instead. This will
> remove the churn when any new chip will require the same change in the
> future.
>
> So, please make it two patches:
> - introducing a field in chip_info and use it for the existing cases
> - add this field to be true for the ad7994 case.
>
> Is it doable?
>
Yes, it is. A patch series is coming.
> --
> With Best Regards,
> Andy Shevchenko
Powered by blists - more mailing lists