From: cjz <guagua210311@qq.com>
To: linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Grygorii.Strashko@ti.com, ssantosh@kernel.org,
khilman@kernel.org, linus.walleij@linaro.org, brgl@kernel.org,
guagua210311@qq.com
Subject: [PATCH] gpio: omap: add kernel-doc comment for omap_gpio_get()
Date: Mon, 1 Dec 2025 17:54:21 +0800 [thread overview]
Message-ID: <tencent_BB49A52B7796EBAFEC293B0B5203602BD608@qq.com> (raw)
From: changjunzheng <guagua210311@qq.com>
omap_gpio_get() is a core function for reading OMAP GPIO pin level, but it lacks complete kernel-doc comment (no function description, parameter explanation, or return value说明). This causes gcc W=1 warning and reduces code readability.
Add standard kernel-doc comment to fix the warning and improve maintainability.
Signed-off-by: changjunzheng <guagua210311@qq.com>
---
drivers/gpio/gpio-omap.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index a268c76bdca6..ad69892e9d98 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -861,6 +861,17 @@ static int omap_gpio_input(struct gpio_chip *chip, unsigned offset)
return 0;
}
+/**
+ * omap_gpio_get - Get the logic level of an OMAP GPIO pin
+ * @chip: Pointer to the GPIO chip instance
+ * @offset: Offset of the GPIO pin within the chip's pin range
+ *
+ * Read the current logic level of the specified OMAP GPIO pin. If the pin is
+ * configured as input, read the actual pin level; if configured as output, read
+ * the last set output level.
+ *
+ * Return: 0 if the pin is at low level, 1 if at high level
+ */
static int omap_gpio_get(struct gpio_chip *chip, unsigned offset)
{
struct gpio_bank *bank = gpiochip_get_data(chip);
--
2.43.0
next reply other threads:[~2025-12-01 9:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 9:54 cjz [this message]
2025-12-01 10:46 ` Andreas Kemnade
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=tencent_BB49A52B7796EBAFEC293B0B5203602BD608@qq.com \
--to=guagua210311@qq.com \
--cc=Grygorii.Strashko@ti.com \
--cc=brgl@kernel.org \
--cc=khilman@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=ssantosh@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®