[PATCH v3 2/2] iio: adc: add Axiado SARADC driver

David Lechner dlechner at baylibre.com
Mon Jun 29 07:54:28 PDT 2026


On 6/28/26 9:33 PM, Petar Stepanovic wrote:
> 
> On 6/28/2026 1:07 AM, David Lechner wrote:

...

>>> +};
>>> +
>>> +static void axiado_saradc_disable(void *data)
>>> +{
>>> +     struct axiado_saradc *info = data;
>>> +
>>> +     writel(AX_SARADC_GLOBAL_CTRL_PD, info->regs + AX_SARADC_GLOBAL_CTRL_REG);
>> People usual make read and write wrappers or use regmap to avoid having
>> to write `info->regs + AX_SARADC_GLOBAL_CTRL_REG` so many times.
> 
> My understanding is that simple read/write wrappers are not always
> preferred unless they provide additional value. Would switching the
> driver to regmap be acceptable here to avoid repeating the base address
> calculation?
> 
Yes, regmap is always nice because it brings a lot of extra features
for free.



More information about the linux-arm-kernel mailing list