Skip to content

Migrate IDIO-16 GPIO drivers to regmap API

William Breathitt Gray linux-gpio lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 8 repliesIn review
  2. v16 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- 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

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6regmap-irq: Add no_status supportdrivers/base/regmap/regmap-irq.c include/linux/regmap.h+17 -73 replies
2/6gpio: 104-dio-48e: Utilize no_status regmap-irq flagdrivers/gpio/gpio-104-dio-48e.c+1 -50 replies
3/6gpio: idio-16: Migrate to the regmap APIdrivers/gpio/Kconfig drivers/gpio/gpio-idio-16.c drivers/gpio/gpio-idio-16.h+189 -00 replies
4/6gpio: 104-idio-16: Migrate to the regmap APIdrivers/gpio/Kconfig drivers/gpio/gpio-104-idio-16.c+72 -2240 replies
5/6gpio: pci-idio-16: Migrate to the regmap APIdrivers/gpio/Kconfig drivers/gpio/gpio-pci-idio-16.c+70 -2281 reply
6/6gpio: idio-16: Remove unused legacy interfacedrivers/gpio/gpio-idio-16.c drivers/gpio/gpio-idio-16.h+1 -1960 replies

Reviews trailers per patch

5 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAndy ShevchenkoLinus Walleij
SeriesR-b
1/6
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/6] Migrate IDIO-16 GPIO drivers to regmap API

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

Signature · 1 line
2.39.2