[PATCH v2 2/4] iio: adc: mt6323-auxadc: add mt6323 PMIC AUXADC driver

Roman Vivchar rva333 at protonmail.com
Tue Jun 9 12:15:42 PDT 2026


Hi Andy,

On Tuesday, June 9th, 2026 at 9:30 PM, Andy Shevchenko <andriy.shevchenko at intel.com> wrote:
> On Tue, Jun 09, 2026 at 04:31:59PM +0300, Roman Vivchar via B4 Relay wrote:
>

...

>
> > +	ret = regmap_read_poll_timeout(map, MT6323_AUXADC_ADC19, val,
> > +				       !(val & AUXADC_ADC19_BUSY_MASK),
> > +				       10, 500);
>
> It's better to split on logical boundaries:
>
> 	ret = regmap_read_poll_timeout(map, MT6323_AUXADC_ADC19,
> 				       val, !(val & AUXADC_ADC19_BUSY_MASK),
> 				       10, 500);
>

Agreed.

...

>
> > +	case IIO_CHAN_INFO_RAW:
> > +		scoped_guard(mutex, &auxadc->lock) {
>
> I'm wondering why we haven't moved to guard()() here

The compiler would complain about 'cannot jump from switch statement'
due to default case.

Best regards,
Roman



More information about the linux-arm-kernel mailing list