From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Frank Rowand <frowand.list@gmail.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Jan Kundrát" <jan.kundrat@cesnet.cz>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>
Subject: [PATCH v2 3/5] gpio: use new gpio_set_config() helper in more places
Date: Thu, 7 Feb 2019 17:28:57 +0100 [thread overview]
Message-ID: <20190207162859.26252-4-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20190207162859.26252-1-thomas.petazzoni@bootlin.com>
As suggested by Linus Walleij, let's use the new gpio_set_config()
helper in gpiod_set_debounce() and gpiod_set_transitory().
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
drivers/gpio/gpiolib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index cf8a4402fef1..9762a836fec9 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2762,7 +2762,7 @@ int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce)
}
config = pinconf_to_config_packed(PIN_CONFIG_INPUT_DEBOUNCE, debounce);
- return chip->set_config(chip, gpio_chip_hwgpio(desc), config);
+ return gpio_set_config(chip, gpio_chip_hwgpio(desc), config);
}
EXPORT_SYMBOL_GPL(gpiod_set_debounce);
@@ -2799,7 +2799,7 @@ int gpiod_set_transitory(struct gpio_desc *desc, bool transitory)
packed = pinconf_to_config_packed(PIN_CONFIG_PERSIST_STATE,
!transitory);
gpio = gpio_chip_hwgpio(desc);
- rc = chip->set_config(chip, gpio, packed);
+ rc = gpio_set_config(chip, gpio, packed);
if (rc == -ENOTSUPP) {
dev_dbg(&desc->gdev->dev, "Persistence not supported for GPIO %d\n",
gpio);
--
2.20.1
next prev parent reply other threads:[~2019-02-07 16:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-07 16:28 [PATCH v2 0/5] gpio: add support for pull-up/pull-down configuration Thomas Petazzoni
2019-02-07 16:28 ` [PATCH v2 1/5] dt-bindings: gpio: document the new pull-up/pull-down flags Thomas Petazzoni
2019-02-07 16:28 ` [PATCH v2 2/5] gpio: rename gpio_set_drive_single_ended() to gpio_set_config() Thomas Petazzoni
2019-02-07 16:28 ` Thomas Petazzoni [this message]
2019-03-16 1:43 ` [PATCH v2 3/5] gpio: use new gpio_set_config() helper in more places Guenter Roeck
2019-03-16 13:45 ` Thomas Petazzoni
2019-03-16 14:20 ` Guenter Roeck
2019-03-26 20:03 ` Guenter Roeck
2019-03-26 21:04 ` Thomas Petazzoni
2019-02-07 16:28 ` [PATCH v2 4/5] gpio: add core support for pull-up/pull-down configuration Thomas Petazzoni
2019-02-07 16:28 ` [PATCH v2 5/5] gpio: pca953x: add ->set_config implementation Thomas Petazzoni
2019-02-13 8:15 ` [PATCH v2 0/5] gpio: add support for pull-up/pull-down configuration 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=20190207162859.26252-4-thomas.petazzoni@bootlin.com \
--to=thomas.petazzoni@bootlin.com \
--cc=bgolaszewski@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=jan.kundrat@cesnet.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).