From: Bartosz Golaszewski <brgl@bgdev.pl>
To: Ludovic Desroches <ludovic.desroches@microchip.com>,
Linus Walleij <linus.walleij@linaro.org>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Jerome Brunet <jbrunet@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Xianwei Zhao <xianwei.zhao@amlogic.com>,
Patrick Rudolph <patrick.rudolph@9elements.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH 04/10] pinctrl: abx500: use new GPIO line value setter callbacks
Date: Tue, 08 Apr 2025 09:17:41 +0200 [thread overview]
Message-ID: <20250408-gpiochip-set-rv-pinctrl-part1-v1-4-c9d521d7c8c7@linaro.org> (raw)
In-Reply-To: <20250408-gpiochip-set-rv-pinctrl-part1-v1-0-c9d521d7c8c7@linaro.org>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
drivers/pinctrl/nomadik/pinctrl-abx500.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/pinctrl/nomadik/pinctrl-abx500.c b/drivers/pinctrl/nomadik/pinctrl-abx500.c
index 8cd4ba5cf0bd..2f55f83127cf 100644
--- a/drivers/pinctrl/nomadik/pinctrl-abx500.c
+++ b/drivers/pinctrl/nomadik/pinctrl-abx500.c
@@ -167,14 +167,10 @@ static int abx500_gpio_get(struct gpio_chip *chip, unsigned offset)
return bit;
}
-static void abx500_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
+static int abx500_gpio_set(struct gpio_chip *chip, unsigned int offset,
+ int val)
{
- struct abx500_pinctrl *pct = gpiochip_get_data(chip);
- int ret;
-
- ret = abx500_gpio_set_bits(chip, AB8500_GPIO_OUT1_REG, offset, val);
- if (ret < 0)
- dev_err(pct->dev, "%s write failed (%d)\n", __func__, ret);
+ return abx500_gpio_set_bits(chip, AB8500_GPIO_OUT1_REG, offset, val);
}
static int abx500_gpio_direction_output(struct gpio_chip *chip,
@@ -540,7 +536,7 @@ static const struct gpio_chip abx500gpio_chip = {
.direction_input = abx500_gpio_direction_input,
.get = abx500_gpio_get,
.direction_output = abx500_gpio_direction_output,
- .set = abx500_gpio_set,
+ .set_rv = abx500_gpio_set,
.to_irq = abx500_gpio_to_irq,
.dbg_show = abx500_gpio_dbg_show,
};
--
2.45.2
next prev parent reply other threads:[~2025-04-08 7:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 7:17 [PATCH 00/10] pinctrl: convert GPIO chips to using new value setters Bartosz Golaszewski
2025-04-08 7:17 ` [PATCH 01/10] pinctrl: at91-pio4: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-04-10 7:16 ` Claudiu Beznea
2025-04-08 7:17 ` [PATCH 02/10] pinctrl: rk805: " Bartosz Golaszewski
2025-04-08 7:17 ` [PATCH 03/10] pinctrl: abx500: enable building modules with COMPILE_TEST=y Bartosz Golaszewski
2025-04-08 7:17 ` Bartosz Golaszewski [this message]
2025-04-08 7:17 ` [PATCH 05/10] pinctrl: meson: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-04-08 7:41 ` Neil Armstrong
2025-04-08 21:37 ` Martin Blumenstingl
2025-04-08 7:17 ` [PATCH 06/10] pinctrl: amlogic-a4: " Bartosz Golaszewski
2025-04-08 7:41 ` Neil Armstrong
2025-04-08 21:38 ` Martin Blumenstingl
2025-04-09 1:56 ` Xianwei Zhao
2025-04-08 7:17 ` [PATCH 07/10] pinctrl: sx150x: enable building modules with COMPILE_TEST=y Bartosz Golaszewski
2025-04-08 14:27 ` Neil Armstrong
2025-04-16 22:37 ` Nathan Chancellor
2025-04-17 6:42 ` Bartosz Golaszewski
2025-04-17 7:42 ` Linus Walleij
2025-04-08 7:17 ` [PATCH 08/10] pinctrl: sx150x: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-04-08 14:27 ` Neil Armstrong
2025-04-08 7:17 ` [PATCH 09/10] pinctrl: ocelot: " Bartosz Golaszewski
2025-04-08 7:17 ` [PATCH 10/10] pinctrl: cy8c95x0: " Bartosz Golaszewski
2025-04-15 21:48 ` [PATCH 00/10] pinctrl: convert GPIO chips to using new value setters Linus Walleij
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=20250408-gpiochip-set-rv-pinctrl-part1-v1-4-c9d521d7c8c7@linaro.org \
--to=brgl@bgdev.pl \
--cc=alexandre.belloni@bootlin.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linus.walleij@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=nicolas.ferre@microchip.com \
--cc=patrick.rudolph@9elements.com \
--cc=xianwei.zhao@amlogic.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;
as well as URLs for NNTP newsgroup(s).