From: William Breathitt Gray <william.gray@linaro.org>
To: brgl@bgdev.pl, linus.walleij@linaro.org
Cc: linux-kernel@vger.kernel.org, andriy.shevchenko@intel.com,
linux-gpio@vger.kernel.org,
William Breathitt Gray <william.gray@linaro.org>
Subject: [PATCH v2 0/3] Introduce the ACCES IDIO-16 GPIO library module
Date: Sun, 18 Sep 2022 12:50:42 -0400 [thread overview]
Message-ID: <cover.1663519546.git.william.gray@linaro.org> (raw)
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
next reply other threads:[~2022-09-18 19:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 16:50 William Breathitt Gray [this message]
2022-09-18 16:50 ` [PATCH v2 1/3] gpio: idio-16: Introduce the ACCES IDIO-16 GPIO library module 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1663519546.git.william.gray@linaro.org \
--to=william.gray@linaro.org \
--cc=andriy.shevchenko@intel.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).