[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VesaDaMNpfdtxg_LSqjRL28YNKNFOBkCcdkF8B6Mp2J7Q@mail.gmail.com>
Date: Mon, 4 Aug 2025 15:11:31 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Varshini Rajendran <varshini.rajendran@...rochip.com>
Cc: eugen.hristev@...aro.org, jic23@...nel.org, dlechner@...libre.com,
nuno.sa@...log.com, andy@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com, claudiu.beznea@...on.dev, srini@...nel.org,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/15] iio: adc: at91-sama5d2_adc: update calibration
index, validation condition
On Mon, Aug 4, 2025 at 12:03 PM Varshini Rajendran
<varshini.rajendran@...rochip.com> wrote:
>
> Add additional condition for validating the calibration data read from
> the OTP through nvmem device interface. Adjust the calibration indexes
> of sama7g5 according to the buffer received from the OTP memory.
> +/*
> + * The calibration data has a TAG to recognize the packet
> + * The tag has a constant value "ACST" with the ASCII
> + * equivalent 0x41435354. This is used to validate the
> + * calibration data obtained from the OTP.
> + */
> +#define AT91_TEMP_CALIB_TAG 0x41435354
Just add the ASCII representation into the definition name.
For example,
AT91_TAG_ACST
or
AT91_CALIB_TAG_ACST
or choose the better one, but with an ACST token in it.
...
> enum at91_adc_ts_clb_idx {
> - AT91_ADC_TS_CLB_IDX_P1 = 2,
> - AT91_ADC_TS_CLB_IDX_P4 = 5,
> - AT91_ADC_TS_CLB_IDX_P6 = 7,
> - AT91_ADC_TS_CLB_IDX_MAX = 19,
> + AT91_ADC_TS_CLB_IDX_P1 = 1,
> + AT91_ADC_TS_CLB_IDX_P4 = 4,
> + AT91_ADC_TS_CLB_IDX_P6 = 6,
> + AT91_ADC_TS_CLB_IDX_MAX = 18,
This MAX naming with the trailing comma is odd. Either remove MAX, or
remove trailing comma, or explain why moving from 19 to 18 has no side
effects here.
> };
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists