Re: [PATCH v2] iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register

From: Andy Shevchenko
Date: Wed Jul 02 2025 - 03:46:18 EST


On Tue, Jul 01, 2025 at 06:34:05PM -0300, Rodrigo Gobbi wrote:
> avg sample info is a bit field coded inside the following
> bits: 5,6,7 and 8 of a device status register.
>
> channel num info the same, but over bits: 1, 2 and 3.
>
> mask both values in order to avoid touching other register bits,
> since the first info (avg sample), came from dt.

...

> +#define SPEAR_ADC_STATUS_CHANNEL_NUM_MASK GENMASK(3, 1)

You have a problem with indentation.

...

> +#define SPEAR_ADC_STATUS_AVG_SAMPLE_MASK GENMASK(8, 5)

Ditto,

...

And I don't want to check all '+' lines in your changes, please make sure your
editor, mail user agent, other tools you are using, do not mangle the patch and
setup correctly for the indentation style used in the code.

--
With Best Regards,
Andy Shevchenko