From: Johan Hovold <johan@kernel.org>
To: Nishad Kamdar <nishadkamdar@gmail.com>
Cc: Vaibhav Hiremath <hvaibhav.linux@gmail.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
greybus-dev@lists.linaro.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface
Date: Mon, 12 Nov 2018 16:17:39 +0100 [thread overview]
Message-ID: <20181112151739.GI13311@localhost> (raw)
In-Reply-To: <20181111054405.GA32548@nishad>
On Sun, Nov 11, 2018 at 11:14:14AM +0530, Nishad Kamdar wrote:
> Use the gpiod interface instead of the deprecated old non-descriptor
> interface.
>
> Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com>
> ---
> drivers/staging/greybus/arche-apb-ctrl.c | 158 ++++++++++-------------
> 1 file changed, 65 insertions(+), 93 deletions(-)
> - apb->pwrdn_gpio = of_get_named_gpio(np, "pwr-down-gpios", 0);
> - if (apb->pwrdn_gpio < 0)
> - dev_warn(dev, "failed to get power down gpio\n");
> + apb->pwrdn = devm_gpiod_get(dev, "gb,pwr-down-gpios", GPIOD_OUT_LOW);
> + if (IF_ERR(apb->pwrdn)) {
Looks like you didn't even compile test this one. :(
> + ret = PTR_ERR(apb->pwrdn);
> + dev_warn(dev, "Failed requesting power down GPIO: %d\n", ret);
> + return ret;
> + }
Johan
next prev parent reply other threads:[~2018-11-12 15:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-11 5:44 [PATCH] staging: greybus: arche-apb-ctrl.c: Switch to the gpio descriptor interface Nishad Kamdar
2018-11-11 19:36 ` Greg Kroah-Hartman
2018-11-12 16:09 ` Nishad Kamdar
2018-11-12 15:17 ` Johan Hovold [this message]
2018-11-12 16:12 ` Nishad Kamdar
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=20181112151739.GI13311@localhost \
--to=johan@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=hvaibhav.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nishadkamdar@gmail.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).