From: "Pali Rohár" <pali@kernel.org>
To: Stefan Roese <sr@denx.de>
Cc: Marek Behun <marek.behun@nic.cz>, Simon Glass <sjg@chromium.org>,
u-boot@lists.denx.de
Subject: [PATCH 4/8] pinctrl: Add third argument label for pinctrl_gpio_request() function
Date: Mon, 25 Jul 2022 13:56:11 +0200 [thread overview]
Message-ID: <20220725115615.420-5-pali@kernel.org> (raw)
In-Reply-To: <20220725115615.420-1-pali@kernel.org>
This change allows to use pinctrl_gpio_request() function as a direct
pointer for dm_gpio_ops's .request callback.
Signed-off-by: Pali Rohár <pali@kernel.org>
---
drivers/pinctrl/pinctrl-uclass.c | 3 ++-
include/dm/pinctrl.h | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c
index 38ce2b5e0ad9..ce2d5ddf6d92 100644
--- a/drivers/pinctrl/pinctrl-uclass.c
+++ b/drivers/pinctrl/pinctrl-uclass.c
@@ -222,9 +222,10 @@ pinctrl_gpio_get_pinctrl_and_offset(struct udevice *dev, unsigned offset,
*
* @dev: GPIO peripheral device
* @offset: the GPIO pin offset from the GPIO controller
+ * @label: the GPIO pin label
* @return: 0 on success, or negative error code on failure
*/
-int pinctrl_gpio_request(struct udevice *dev, unsigned offset)
+int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const char *label)
{
const struct pinctrl_ops *ops;
struct udevice *pctldev;
diff --git a/include/dm/pinctrl.h b/include/dm/pinctrl.h
index 5436dc4a9a71..e3e50afeaff0 100644
--- a/include/dm/pinctrl.h
+++ b/include/dm/pinctrl.h
@@ -611,10 +611,11 @@ int pinctrl_get_pin_name(struct udevice *dev, int selector, char *buf,
* pinctrl_gpio_request() - Request a single pin to be used as GPIO
* @dev: GPIO peripheral device
* @offset: GPIO pin offset from the GPIO controller
+ * @label: GPIO label
*
* Return: 0 on success, or negative error code on failure
*/
-int pinctrl_gpio_request(struct udevice *dev, unsigned offset);
+int pinctrl_gpio_request(struct udevice *dev, unsigned offset, const char *label);
/**
* pinctrl_gpio_free() - Free a single pin used as GPIO
--
2.20.1
next prev parent reply other threads:[~2022-07-25 11:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 11:56 [PATCH 0/8] arm: mvebu: Add Armada 38x pin muxing support Pali Rohár
2022-07-25 11:56 ` [PATCH 1/8] pinctrl: Add new function pinctrl_generic_set_state_prefix() Pali Rohár
2022-07-28 6:25 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 2/8] mvebu: pinctrl: Add Armada 38x driver Pali Rohár
2022-07-28 6:27 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 3/8] arm: mvebu: Add gpio-ranges into Armada 38x device tree file Pali Rohár
2022-07-28 6:27 ` Stefan Roese
2022-07-25 11:56 ` Pali Rohár [this message]
2022-07-28 6:27 ` [PATCH 4/8] pinctrl: Add third argument label for pinctrl_gpio_request() function Stefan Roese
2022-07-28 13:07 ` Stefan Roese
2022-07-28 13:15 ` Pali Rohár
2022-07-28 13:18 ` Stefan Roese
2022-07-28 15:33 ` Pali Rohár
2022-07-25 11:56 ` [PATCH 5/8] gpio: mvebu_gpio: Add .request and .rfree methods for Armada 38x Pali Rohár
2022-07-28 6:28 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 6/8] gpio: mvebu_gpio: Read number of gpios from DT Pali Rohár
2022-07-28 6:28 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 7/8] gpio: mvebu_gpio: Set bank name to mvebu%d Pali Rohár
2022-07-28 6:29 ` Stefan Roese
2022-07-25 11:56 ` [PATCH 8/8] arm: mvebu: turris_omnia: Enable a38x pinctrl and gpio support Pali Rohár
2022-07-28 6:29 ` Stefan Roese
2022-07-28 21:42 ` Tony Dinh
2022-07-29 7:38 ` Pali Rohár
2022-07-29 8:01 ` Stefan Roese
2022-07-29 1:39 ` [PATCH 0/8] arm: mvebu: Add Armada 38x pin muxing support Tony Dinh
2022-07-29 12:00 ` Stefan Roese
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=20220725115615.420-5-pali@kernel.org \
--to=pali@kernel.org \
--cc=marek.behun@nic.cz \
--cc=sjg@chromium.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
/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