Re: [PATCH v6 04/17] iio: adc: at91-sama5d2_adc: rework temp calibration layout handling
Jonathan Cameron <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-iio |
|---|---|
| Message-ID | <20260815210018.460c0eca@jic23-huawei> |
On Thu, 6 Aug 2026 13:10:11 +0530 Varshini Rajendran <[email protected]> wrote: > Extend support to handle different temperature calibration layouts. > > Add a temperature calibration data layout structure to describe indexes > of the factors P1, P4, P6, tag, minimum length of the packet and the > scaling factors for P1 (p1_scale) which are SoC-specific instead of the > older non scalable id structure. This helps handle the differences in the > same function flow and prepare the calibration data to be applied. > > Reviewed-by: Eugen Hristev <[email protected]> > Signed-off-by: Varshini Rajendran <[email protected]> https://sashiko.dev/#/patchset/20260806074024.531259-1-varshini.rajendran%40microchip.com For the unused define comment. I 'might' tweak this is apply or go meh i can't be bothered and apply it away :) Again - if you respin for another reason please tidy this up. The other comment from Sashiko doesn't seem particularly useful to me even if it is maybe valid. > --- > drivers/iio/adc/at91-sama5d2_adc.c | 66 ++++++++++++++++++++++-------- > 1 file changed, 48 insertions(+), 18 deletions(-) > > diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c > index 09390f082fc4..82db8f2f4db0 100644 > --- a/drivers/iio/adc/at91-sama5d2_adc.c > +++ b/drivers/iio/adc/at91-sama5d2_adc.c > @@ -16,6 +16,7 @@ > #include <linux/dmaengine.h> > #include <linux/interrupt.h> > #include <linux/io.h> > +#include <linux/math.h> > #include <linux/module.h> > #include <linux/platform_device.h> > #include <linux/property.h> > @@ -444,6 +445,27 @@ static const struct at91_adc_reg_layout sama7g5_layout = { > #define at91_adc_writel(st, reg, val) \ > writel_relaxed(val, (st)->base + (st)->soc_info.platform->layout->reg) > > +/* Temperature calibration tag "ACST" in ASCII */ > +#define AT91_TEMP_CALIB_TAG_ACST 0x41435354 Eagle eyed sashiko spotted this isn't used in this patch. Should have been introduced with first use in patch 5 I think.