[PATCH v2 05/16] iio: adc: mediatek: add mt6323 PMIC AUXADC driver

Andy Shevchenko andriy.shevchenko at intel.com
Tue May 12 09:56:03 PDT 2026


On Tue, May 12, 2026 at 02:34:55PM +0000, Roman Vivchar wrote:
> On Tuesday, May 12th, 2026 at 4:29 PM, Jonathan Cameron <jic23 at kernel.org> wrote:
> > On Tue, 12 May 2026 08:18:19 +0300
> > Roman Vivchar via B4 Relay <devnull+rva333.protonmail.com at kernel.org> wrote:

...

> > > +#define VOLTAGE_FULL_RANGE	1800
> > Probably better to have this inline - however if you do keep it
> > prefix t he define  VOLTAGE_FULL_RANGE sounds too generic!
> > 
> > > +#define AUXADC_PRECISE		32768
> > I'd put that inline.  Little benefit it in having it up here...
> 
> There was a mention about magic values in the v1 for the thermal patch [1].
> Andy, would it be better to use an inline style or a #define here?
> If the former, I'll rename the first constant to something like
> AUXADC_VOLTAGE_FULL_RANGE.

If you use it inline, add a comment to explain the magic.
It will be a good compromise.

> [1]: https://lore.kernel.org/linux-mediatek/afmnUG8dG0N0HpV6@ashevche-desk.local/

-- 
With Best Regards,
Andy Shevchenko





More information about the Linux-mediatek mailing list