From: Bartosz Golaszewski <brgl@bgdev.pl>
To: "Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Maxime Coquelin" <mcoquelin.stm32@gmail.com>,
"Alexandre Torgue" <alexandre.torgue@foss.st.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>
Cc: linux-gpio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, patches@opensource.cirrus.com,
linux-pwm@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH 3/6] gpio: wm831x: don't print out global GPIO numbers in debugfs callbacks
Date: Tue, 26 Aug 2025 11:54:37 +0200 [thread overview]
Message-ID: <20250826-gpio-dbg-show-base-v1-3-7f27cd7f2256@linaro.org> (raw)
In-Reply-To: <20250826-gpio-dbg-show-base-v1-0-7f27cd7f2256@linaro.org>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
In order to further limit the number of references to the GPIO base
number stored in struct gpio_chip, replace the global GPIO numbers in
the output of debugfs callbacks by hardware offsets.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/gpio/gpio-wm831x.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-wm831x.c b/drivers/gpio/gpio-wm831x.c
index f03c0e808fab27349c39f9efc41e5ea420b2d03b..489479d6f32b3a8bcd7592e46ad61ec70794a2ab 100644
--- a/drivers/gpio/gpio-wm831x.c
+++ b/drivers/gpio/gpio-wm831x.c
@@ -159,7 +159,6 @@ static void wm831x_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
int i, tristated;
for (i = 0; i < chip->ngpio; i++) {
- int gpio = i + chip->base;
int reg;
const char *pull, *powerdomain;
@@ -175,13 +174,13 @@ static void wm831x_gpio_dbg_show(struct seq_file *s, struct gpio_chip *chip)
}
seq_printf(s, " gpio-%-3d (%-20.20s) ",
- gpio, label ?: "Unrequested");
+ i, label ?: "Unrequested");
reg = wm831x_reg_read(wm831x, WM831X_GPIO1_CONTROL + i);
if (reg < 0) {
dev_err(wm831x->dev,
"GPIO control %d read failed: %d\n",
- gpio, reg);
+ i, reg);
seq_putc(s, '\n');
continue;
}
--
2.48.1
next prev parent reply other threads:[~2025-08-26 9:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-26 9:54 [PATCH 0/6] gpio: remove references to gpio_chip::base from debugfs callbacks Bartosz Golaszewski
2025-08-26 9:54 ` [PATCH 1/6] gpio: stmpe: don't print out global GPIO numbers in " Bartosz Golaszewski
2025-08-26 9:54 ` [PATCH 2/6] gpio: nomadik: " Bartosz Golaszewski
2025-08-26 9:54 ` Bartosz Golaszewski [this message]
2025-08-26 10:11 ` [PATCH 3/6] gpio: wm831x: " Charles Keepax
2025-08-26 9:54 ` [PATCH 4/6] gpio: wm8994: " Bartosz Golaszewski
2025-08-26 10:12 ` Charles Keepax
2025-08-26 9:54 ` [PATCH 5/6] gpio: mvebu: " Bartosz Golaszewski
2025-08-26 9:54 ` [PATCH 6/6] gpio: xra1403: " Bartosz Golaszewski
2025-08-28 20:39 ` [PATCH 0/6] gpio: remove references to gpio_chip::base from " Linus Walleij
2025-09-03 7:38 ` Bartosz Golaszewski
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=20250826-gpio-dbg-show-base-v1-3-7f27cd7f2256@linaro.org \
--to=brgl@bgdev.pl \
--cc=alexandre.torgue@foss.st.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=patches@opensource.cirrus.com \
--cc=ukleinek@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).