From: Bartosz Golaszewski <brgl@bgdev.pl>
To: "Santosh Kumar Yadav" <santoshkumar.yadav@barco.com>,
"Peter Korsgaard" <peter.korsgaard@barco.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>
Cc: platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: [PATCH 2/3] platform/x86: int0002: use new GPIO line value setter callbacks
Date: Tue, 08 Apr 2025 09:19:54 +0200 [thread overview]
Message-ID: <20250408-gpiochip-set-rv-platform-x86-v1-2-6f67e76a722c@linaro.org> (raw)
In-Reply-To: <20250408-gpiochip-set-rv-platform-x86-v1-0-6f67e76a722c@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/platform/x86/intel/int0002_vgpio.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/x86/intel/int0002_vgpio.c b/drivers/platform/x86/intel/int0002_vgpio.c
index 3b48cd7a4075..ab104fddee89 100644
--- a/drivers/platform/x86/intel/int0002_vgpio.c
+++ b/drivers/platform/x86/intel/int0002_vgpio.c
@@ -65,9 +65,10 @@ static int int0002_gpio_get(struct gpio_chip *chip, unsigned int offset)
return 0;
}
-static void int0002_gpio_set(struct gpio_chip *chip, unsigned int offset,
- int value)
+static int int0002_gpio_set(struct gpio_chip *chip, unsigned int offset,
+ int value)
{
+ return 0;
}
static int int0002_gpio_direction_output(struct gpio_chip *chip,
@@ -192,7 +193,7 @@ static int int0002_probe(struct platform_device *pdev)
chip->parent = dev;
chip->owner = THIS_MODULE;
chip->get = int0002_gpio_get;
- chip->set = int0002_gpio_set;
+ chip->set_rv = int0002_gpio_set;
chip->direction_input = int0002_gpio_get;
chip->direction_output = int0002_gpio_direction_output;
chip->base = -1;
--
2.45.2
next prev parent reply other threads:[~2025-04-08 7:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 7:19 [PATCH 0/3] platform/x86: convert GPIO chips to using new value setters Bartosz Golaszewski
2025-04-08 7:19 ` [PATCH 1/3] platform/x86: barco-p50: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-04-08 7:24 ` Korsgaard, Peter
2025-04-08 7:19 ` Bartosz Golaszewski [this message]
2025-04-08 7:19 ` [PATCH 3/3] platform/x86: silicom: " Bartosz Golaszewski
2025-04-08 8:50 ` [PATCH 0/3] platform/x86: convert GPIO chips to using new value setters Hans de Goede
2025-04-11 12:24 ` Ilpo Järvinen
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-platform-x86-v1-2-6f67e76a722c@linaro.org \
--to=brgl@bgdev.pl \
--cc=bartosz.golaszewski@linaro.org \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.korsgaard@barco.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=santoshkumar.yadav@barco.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).