mbox series

[v2,0/6] Migrate IDIO-16 GPIO drivers to regmap API

Message ID cover.1677515341.git.william.gray@linaro.org
Headers show
Series Migrate IDIO-16 GPIO drivers to regmap API | expand

Message

William Breathitt Gray Feb. 27, 2023, 4:45 p.m. UTC
Changes in v2:
 - Utilize memset32() to set status_buf for no_status case
 - Utilize GENMASK() to generate status_buf mask
 - Move no_status kernel doc line under runtime_pm line
 - Add comma to end of idio_16_names initialization list
 - Set io_port to true in idio_16_regmap_config

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-idio-16 and pci-idio-16 modules depend
on the IDIO-16 library and are thus updated accordingly.

The 104-IDIO-16 lacks a status register (as does the 104-DIO-48E), so a
no_status flag is introduced to the regmap-irq API to properly handle
such cases and avoid hacks. The 104-dio-48e module is updated in a
subsequent patch to take advantage of this new no_status flag.

By leveraging the regmap API, the idio-16 library is reduced to simply a
devm_idio_16_regmap_register() function and a configuration structure
struct idio_16_regmap_config.

William Breathitt Gray (6):
  regmap-irq: Add no_status support
  gpio: 104-dio-48e: Utilize no_status regmap-irq flag
  gpio: idio-16: Migrate to the regmap API
  gpio: 104-idio-16: Migrate to the regmap API
  gpio: pci-idio-16: Migrate to the regmap API
  gpio: idio-16: Remove unused legacy interface

 drivers/base/regmap/regmap-irq.c |  22 ++-
 drivers/gpio/Kconfig             |   7 +-
 drivers/gpio/gpio-104-dio-48e.c  |   6 +-
 drivers/gpio/gpio-104-idio-16.c  | 294 ++++++++----------------------
 drivers/gpio/gpio-idio-16.c      | 255 ++++++++++++++------------
 drivers/gpio/gpio-idio-16.h      |  80 +++------
 drivers/gpio/gpio-pci-idio-16.c  | 296 +++++++------------------------
 include/linux/regmap.h           |   2 +
 8 files changed, 326 insertions(+), 636 deletions(-)


base-commit: 4827aae061337251bb91801b316157a78b845ec7

Comments

Mark Brown March 6, 2023, 2:09 p.m. UTC | #1
On Mon, 27 Feb 2023 11:45:21 -0500, William Breathitt Gray wrote:
> Changes in v2:
>  - Utilize memset32() to set status_buf for no_status case
>  - Utilize GENMASK() to generate status_buf mask
>  - Move no_status kernel doc line under runtime_pm line
>  - Add comma to end of idio_16_names initialization list
>  - Set io_port to true in idio_16_regmap_config
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git for-next

Thanks!

[1/6] regmap-irq: Add no_status support
      commit: 4d60cac951fd2dfbf261b83abb805748abc8b995

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Linus Walleij March 6, 2023, 2:12 p.m. UTC | #2
On Mon, Feb 27, 2023 at 5:54 PM William Breathitt Gray
<william.gray@linaro.org> wrote:

This looks good to me.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Bartosz, of you merge this you can drop the corresponding
patches to immutable irqchip conversion for these chips
that I will be posting shortly (currently on the build servers).

Yours,
Linus Walleij
Bartosz Golaszewski March 15, 2023, 10:02 a.m. UTC | #3
On Mon, Mar 6, 2023 at 3:13 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Feb 27, 2023 at 5:54 PM William Breathitt Gray
> <william.gray@linaro.org> wrote:
>
> This looks good to me.
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> Bartosz, of you merge this you can drop the corresponding
> patches to immutable irqchip conversion for these chips
> that I will be posting shortly (currently on the build servers).
>
> Yours,
> Linus Walleij

Mark, can you provide me with an immutable tag for the regmap tree
containing commit 1/6 from this series, please?

Bartosz
Linus Walleij March 15, 2023, 10:14 a.m. UTC | #4
On Wed, Mar 15, 2023 at 11:02 AM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> On Mon, Mar 6, 2023 at 3:13 PM Linus Walleij <linus.walleij@linaro.org> wrote:
> >
> > On Mon, Feb 27, 2023 at 5:54 PM William Breathitt Gray
> > <william.gray@linaro.org> wrote:
> >
> > This looks good to me.
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > Bartosz, of you merge this you can drop the corresponding
> > patches to immutable irqchip conversion for these chips
> > that I will be posting shortly (currently on the build servers).
> >
> > Yours,
> > Linus Walleij
>
> Mark, can you provide me with an immutable tag for the regmap tree
> containing commit 1/6 from this series, please?

I think there will be a conflict with the immutable irq_chip patches
that are merged, but maybe the conflict isn't that bad so you can
resolve it while applying.

Yours,
Linus Walleij