Re: [PATCH v2 4/4] gpio: i8255: Migrate to regmap API

From: Andy Shevchenko
Date: Sun Nov 13 2022 - 07:52:49 EST


On Thu, Nov 10, 2022 at 08:55:53PM -0500, William Breathitt Gray wrote:
> The regmap API supports IO port accessors so we can take advantage of
> regmap abstractions rather than handling access to the device registers
> directly in the driver. The 104-dio-48e and gpio-mm modules depend on
> the i8255 library and are thus updated accordingly.
>
> By leveraging the gpio_regmap API, the i8255 library is reduced to
> simply a devm_i8255_regmap_register() function, a configuration
> structure struct i8255_regmap_config, and a helper macro
> i8255_volatile_regmap_range() provided to simplify volatile PPI register
> hinting for the regmap.

> Cc: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Suggested-by?
(I'm not insisting, just consider if it's appropriate to use here or in the
other patches)

> Signed-off-by: William Breathitt Gray <william.gray@xxxxxxxxxx>
> ---
> drivers/gpio/Kconfig | 2 +
> drivers/gpio/gpio-104-dio-48e.c | 397 ++++++++++-------------------
> drivers/gpio/gpio-gpio-mm.c | 151 +++--------
> drivers/gpio/gpio-i8255.c | 429 +++++++++++---------------------
> drivers/gpio/gpio-i8255.h | 80 +++---

Can we actually split this to a few steps:
- providing gpio-i8255-regmap
- providing gpio-mm-regmap
- converting the driver
- removing not used modules (one by one)
?

In this case if any regression somewhere appears, we can always perform a
(semi-)revert for a certain driver.


--
With Best Regards,
Andy Shevchenko