Re: [PATCH v3 04/13] iio: adc: at91-sama5d2_adc: adapt the driver for sama7d65
From: Jonathan Cameron
Date: Tue Jun 30 2026 - 19:43:45 EST
On Tue, 30 Jun 2026 15:05:54 +0530
Varshini Rajendran <varshini.rajendran@xxxxxxxxxxxxx> wrote:
> Add support for sama7d65 ADC. The differences are highlighted with the
> compatible. The calibration data layout is the main difference.
>
> Update Kconfig help text to mention SAMA7 SoC family support.
>
> Signed-off-by: Varshini Rajendran <varshini.rajendran@xxxxxxxxxxxxx>
> @@ -2639,6 +2667,9 @@ static const struct of_device_id at91_adc_dt_match[] = {
> }, {
> .compatible = "microchip,sama7g5-adc",
> .data = (const void *)&sama7g5_platform,
> + }, {
> + .compatible = "microchip,sama7d65-adc",
> + .data = (const void *)&sama7d65_platform,
Silly question for you that is more about the original code than what you
are adding, but why the casts? It is already a const pointer so I think
we are fine under the C spec to just do this cast implicitly to a const
void *
If you agree, ideally please add a precursor patch to drop these casts
before this patch.
Thanks,
Jonathan
> }, {
> /* sentinel */
> }