linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Introduce the ACCES IDIO-16 GPIO library module
@ 2022-09-18 16:50 William Breathitt Gray
  2022-09-18 16:50 ` [PATCH v2 1/3] gpio: idio-16: " William Breathitt Gray
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: William Breathitt Gray @ 2022-09-18 16:50 UTC (permalink / raw)
  To: brgl, linus.walleij
  Cc: linux-kernel, andriy.shevchenko, linux-gpio, William Breathitt Gray

Changes in v2:
 - Added offset check for last byte of inputs in idio_16_get() for
   robustness
 - Replaced hardcoded '16' with IDIO_16_NOUT constant in idio_16_get*()
 - Renamed IDIO_16 namespace to GPIO_IDIO_16; adjusted 104-idio-16 and
   pci-idio-16 drivers accordingly
 - Utilized DEFAULT_SYMBOL_NAMESPACE to simplify namespace exports
 - Refactored callbacks to utilize cached output states; idio_16_get()
   callback now requires struct idio_16_state state; adjusted
   104-idio-16 and pci-idio-16 drivers accordingly
 - Moved bitmap_fill() to after idio_16_state_init() in idio_16_probe()
   to prevent clobbering out_state if the implementation of
   idio_16_state_init changes in the future
 - Adjusted offset checks in idio_16_set() and idio_16_get_direction()
   to ">= IDIO_16_NOUT" for consistency
 - Utilized __assign_bit() in idio_16_set()
 - Refactored idio_16_*_multiple() callbacks to utilize bitmap_replace()

In a similar vein as the Intel 8255 interface library module [0], the
ACCES IDIO-16 GPIO library module is introduced to consolidate much of
the shared code between the existing 104-IDIO-16 and PCI-IDIO-16 GPIO
drivers.

The idio-16 module exposes consumer library functions to facilitate
communication with devices within the ACCES IDIO-16 family such as the
104-IDIO-16 and the PCI-IDIO-16.

A CONFIG_GPIO_IDIO_16 Kconfig option is introduced by this patch.
Modules wanting access to these idio-16 library functions should select
this Kconfig option and import the GPIO_IDIO_16 symbol namespace.

[0] https://lore.kernel.org/all/d1a24895f2ea67f689c24c34a20ddb43cd7246af.1658324498.git.william.gray@linaro.org/

William Breathitt Gray (3):
  gpio: idio-16: Introduce the ACCES IDIO-16 GPIO library module
  gpio: 104-idio-16: Utilize the idio-16 GPIO library
  gpio: pci-idio-16: Utilize the idio-16 GPIO library

 MAINTAINERS                     |   7 ++
 drivers/gpio/Kconfig            |  11 +++
 drivers/gpio/Makefile           |   1 +
 drivers/gpio/gpio-104-idio-16.c |  88 ++++---------------
 drivers/gpio/gpio-idio-16.c     | 146 ++++++++++++++++++++++++++++++++
 drivers/gpio/gpio-idio-16.h     |  71 ++++++++++++++++
 drivers/gpio/gpio-pci-idio-16.c | 119 +++-----------------------
 7 files changed, 265 insertions(+), 178 deletions(-)
 create mode 100644 drivers/gpio/gpio-idio-16.c
 create mode 100644 drivers/gpio/gpio-idio-16.h


base-commit: d9e7f0e320516c660d6f33e6c16a3d99970eb14e
-- 
2.37.3


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

end of thread, other threads:[~2022-10-25  7:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18 16:50 [PATCH v2 0/3] Introduce the ACCES IDIO-16 GPIO library module William Breathitt Gray
2022-09-18 16:50 ` [PATCH v2 1/3] gpio: idio-16: " William Breathitt Gray
2022-10-25  7:59   ` Bartosz Golaszewski
2022-09-18 16:50 ` [PATCH v2 2/3] gpio: 104-idio-16: Utilize the idio-16 GPIO library William Breathitt Gray
2022-09-18 16:50 ` [PATCH v2 3/3] gpio: pci-idio-16: " William Breathitt Gray
2022-10-20 12:10 ` [PATCH v2 0/3] Introduce the ACCES IDIO-16 GPIO library module Bartosz Golaszewski
2022-10-21 16:18   ` Andy Shevchenko

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).