linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Migrate PCIe-IDIO-24 GPIO driver to the regmap API
@ 2023-02-28  1:53 William Breathitt Gray
  2023-02-28  1:53 ` [PATCH 1/3] regmap: Pass regmap and irq_drv_data as parameters for set_type_config() William Breathitt Gray
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: William Breathitt Gray @ 2023-02-28  1:53 UTC (permalink / raw)
  To: linus.walleij, brgl
  Cc: broonie, linux-gpio, linux-kernel, michael, quarium, jhentges,
	jay.dolan, William Breathitt Gray

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.

A patch to pass the device regmap and irq_drv_data as a parameters for
the struct regmap_irq_chip set_type_config() is included. This is needed
by idio_24_set_type_config() in order to update the type configuration
on the device as well as irq_drv_data for idio_24_handle_mask_sync().

A patch moving the struct gpio_regmap declaration to linux/gpio/regmap.h
is also included. This is needed by idio_24_reg_mask_xlate() in order to
determine the current offset's direction by using gpio->regmap in
regmap_read(). One point to consider is whether an alternative solution
is better of passing regmap in the reg_mask_xlate() parameter list; this
would avoid the need to include <linux/gpio/driver.h> in order to
resolve an incomplete type warning for struct gpio_chip due to the move.

William Breathitt Gray (3):
  regmap: Pass regmap and irq_drv_data as parameters for
    set_type_config()
  gpio: gpio-regmap: Expose struct gpio_regmap in linux/gpio/regmap.h
  gpio: pcie-idio-24: Migrate to the regmap API

 drivers/base/regmap/regmap-irq.c |  13 +-
 drivers/gpio/Kconfig             |   3 +
 drivers/gpio/gpio-pcie-idio-24.c | 697 ++++++++++++-------------------
 drivers/gpio/gpio-regmap.c       |  20 -
 include/linux/gpio/regmap.h      |  23 +-
 include/linux/regmap.h           |  12 +-
 6 files changed, 303 insertions(+), 465 deletions(-)


base-commit: 4827aae061337251bb91801b316157a78b845ec7
-- 
2.39.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-03-01  4:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28  1:53 [PATCH 0/3] Migrate PCIe-IDIO-24 GPIO driver to the regmap API William Breathitt Gray
2023-02-28  1:53 ` [PATCH 1/3] regmap: Pass regmap and irq_drv_data as parameters for set_type_config() William Breathitt Gray
2023-02-28  1:53 ` [PATCH 2/3] gpio: gpio-regmap: Expose struct gpio_regmap in linux/gpio/regmap.h William Breathitt Gray
2023-02-28 20:44   ` Michael Walle
2023-02-28  3:12     ` William Breathitt Gray
2023-02-28  1:53 ` [PATCH 3/3] gpio: pcie-idio-24: Migrate to the regmap API William Breathitt Gray
2023-03-01  4:11   ` kernel test robot
2023-02-28 19:09 ` [PATCH 0/3] Migrate PCIe-IDIO-24 GPIO driver " Mark Brown
2023-02-28  2:19   ` William Breathitt Gray
2023-02-28 19:28     ` Mark Brown
2023-02-28  2:40       ` William Breathitt Gray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).