RE: [PATCH v4 2/2] pinctrl: pinctrl-mlxbf: Add pinctrl driver support
From: Asmaa Mnebhi
Date: Tue Mar 14 2023 - 16:30:48 EST
> > > > + /* This resource is shared so use devm_ioremap */
> > >
> > > Can you elaborate on who actually requests the region? And why is it
> > > not _this_ driver?
> >
> > This resource is shared with the gpio-mlxbf3.c driver. The gpio-mlxbf3.c
> driver does not access the same offsets as the pinctrl-mlxbf3.c driver, but it
> accesses several other registers offsets in between.
>
> Okay, so in such a case you need a common denominator that actually does
> this all for you via, for example, regmap. If the region is not requested, bad
> things may happen.
Hi Andy,
I have taken a look at the regmap driver and decided we will maintain the
Current implementation with devm_platform_ioremap_resource.
The main reason is for backward compatibility with older kernels. Although we
Do support the latest kernel, we have some customers who are still using old
Kernels which don’t have regmap support. But I have found a solution which
Involves using devm_platform_ioremap_resource here as you initially
suggested.
patch v5 coming soon!
Thanks.
Asmaa