Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Janani Sunil <janani.sunil@analog.com>
To: Michael Walle <mwalle@kernel.org>,
	Linus Walleij <linusw@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@intel.com>,
	"Janani Sunil" <jananisunil.dev@gmail.com>,
	"Janani Sunil" <janani.sunil@analog.com>
Subject: [PATCH v6 0/3] gpio: Add AD7768 GPIO support
Date: Thu, 3 Sep 2026 14:01:25 +0200	[thread overview]
Message-ID: <20260903-ad7768-gpio-v6-0-4254ef6c9b38@analog.com> (raw)

Add GPIO support for the Analog Devices AD7768 and AD7768-4
simultaneous sampling ADCs.

Datasheet:
https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-ad7768-4.pdf

**Device Overview:**
The AD7768 and AD7768-4 provide five on-chip GPIO pins controlled
through registers shared with the parent IIO device. The GPIO driver is
registered as an auxiliary driver and shares the parent's regmap and
runtime power-management state.

**Features Implemented:**
- Use regmap_test_bits() for single-bit gpio-regmap value and direction
  reads.
- Add optional runtime PM support to gpio-regmap.
- Expose the five AD7768 GPIO pins through gpio-regmap.
- Read output GPIO values from the output-latch register while retaining
  input-state reads for input pins.
- Reserve GPIO4 when it is used to select the crystal or LVDS master
  clock source.

**Patch Summary:**
1. Use regmap_test_bits() for single-bit gpio-regmap reads.
2. Add optional runtime PM support to gpio-regmap.
3. Add the AD7768 GPIO auxiliary driver.

**Testing:**
The complete AD7768 driver was compiled and tested on the
EVAL-AD7768FMCZ using a Zedboard with a mainline kernel.

**Base:**
This series is based on the GPIO subsystem's gpio/for-next branch,
commit a2cfc48fee416f0ea78e7dc38acbf2ce072574cc

Signed-off-by: Janani Sunil <janani.sunil@analog.com>
---
Changes in v6:
- Split the GPIO patches from the main AD7768 IIO series.
- Rebase onto gpio/for-next commit
  a2cfc48fee416f0ea78e7dc38acbf2ce072574cc.
- Adapt the gpio-regmap callbacks to the operation argument present in
  gpio/for-next.
- Align the gpio-regmap runtime-PM member layout with review feedback.
- Move GPIO valid-mask handling into the GPIO driver and reserve GPIO4
  there when it is used for crystal or LVDS clock selection.
- Link to v5: https://lore.kernel.org/r/20260828-ad7768-driver-v5-0-e33ca6f841a2@analog.com

---
Janani Sunil (3):
      gpio: regmap: Use regmap_test_bits() for single bit reads
      gpio: regmap: Add optional runtime PM support
      gpio: ad7768: Add AD7768 GPIO auxiliary driver

 drivers/gpio/Kconfig        |  12 +++++
 drivers/gpio/Makefile       |   1 +
 drivers/gpio/gpio-ad7768.c  | 122 ++++++++++++++++++++++++++++++++++++++++++++
 drivers/gpio/gpio-regmap.c  |  98 +++++++++++++++++++++++++++++------
 include/linux/gpio/regmap.h |   2 +
 5 files changed, 220 insertions(+), 15 deletions(-)
---
base-commit: a2cfc48fee416f0ea78e7dc38acbf2ce072574cc
change-id: 20260903-ad7768-gpio-4a19153b1470

Best regards,
-- 
Janani Sunil <janani.sunil@analog.com>


             reply	other threads:[~2026-09-03 12:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 12:01 Janani Sunil [this message]
2026-09-03 12:01 ` [PATCH v6 1/3] gpio: regmap: Use regmap_test_bits() for single bit reads Janani Sunil
2026-09-03 12:01 ` [PATCH v6 2/3] gpio: regmap: Add optional runtime PM support Janani Sunil
2026-09-04  6:44   ` Michael Walle
2026-09-03 12:01 ` [PATCH v6 3/3] gpio: ad7768: Add AD7768 GPIO auxiliary driver Janani Sunil
2026-09-03 15:21   ` 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=20260903-ad7768-gpio-v6-0-4254ef6c9b38@analog.com \
    --to=janani.sunil@analog.com \
    --cc=andriy.shevchenko@intel.com \
    --cc=brgl@kernel.org \
    --cc=jananisunil.dev@gmail.com \
    --cc=jic23@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwalle@kernel.org \
    --cc=nuno.sa@analog.com \
    /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