[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfCL88GMSRYnJ+wh85Yj_RrBztSLWOvQJTapVdgFerMyg@mail.gmail.com>
Date: Tue, 5 Aug 2025 15:13:06 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Stefano Manni <stefano.manni@...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
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?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists