From: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
To: Bjorn Andersson <andersson@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Linus Walleij <linusw@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Subject: [PATCH] pinctrl: qcom: lpass-lpi: Include value in debugfs output
Date: Tue, 15 Sep 2026 19:00:15 -0500 [thread overview]
Message-ID: <20260915-pinctrl-lpass-debug-v1-1-bc49766c9f6f@oss.qualcomm.com> (raw)
As with other pinctrl providers, it's useful to be able to inspect the
current GPIO state of the LPASS LPI pins during system integration and
debugging.
Extend the driver's debugfs logic to read the current value and include
this in the printout.
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
---
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
index 5fd4a4eba654..9412fd36a4aa 100644
--- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
+++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
@@ -421,6 +421,7 @@ static void lpi_gpio_dbg_show_one(struct seq_file *s,
struct pinctrl_pin_desc pindesc;
unsigned int func;
int is_out;
+ int value;
int drive;
int pull;
u32 ctl_reg;
@@ -443,7 +444,10 @@ static void lpi_gpio_dbg_show_one(struct seq_file *s,
drive = FIELD_GET(LPI_GPIO_OUT_STRENGTH_MASK, ctl_reg);
pull = FIELD_GET(LPI_GPIO_PULL_MASK, ctl_reg);
- seq_printf(s, " %-8s: %-3s %d", pindesc.name, is_out ? "out" : "in", func);
+ value = lpi_gpio_get(chip, offset);
+
+ seq_printf(s, " %-8s: %-3s", pindesc.name, is_out ? "out" : "in");
+ seq_printf(s, " %-4s func%d", str_high_low(value), func);
seq_printf(s, " %dmA", lpi_regval_to_drive(drive));
seq_printf(s, " %s", pulls[pull]);
}
---
base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
change-id: 20260915-pinctrl-lpass-debug-7aa2a92f0225
Best regards,
--
Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
next reply other threads:[~2026-09-16 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 0:00 Bjorn Andersson [this message]
2026-09-16 9:01 ` 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=20260915-pinctrl-lpass-debug-v1-1-bc49766c9f6f@oss.qualcomm.com \
--to=bjorn.andersson@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=brgl@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-msm@vger.kernel.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
all inboxes | Powered by JetHome®