From: Sebastian Reichel <sre@kernel.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
David Woodhouse <dwmw2@infradead.org>,
Heiko Stuebner <heiko@sntech.de>
Subject: Re: [PATCH RESEND] power: gpio_charger: switch to using GPIO descriptors
Date: Wed, 4 Jan 2017 22:20:47 +0100 [thread overview]
Message-ID: <20170104212046.egsccncbvaidioss@earth> (raw)
In-Reply-To: <20161226201855.25298-1-linus.walleij@linaro.org>
[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]
Hi Linus,
On Mon, Dec 26, 2016 at 09:18:55PM +0100, Linus Walleij wrote:
> The GPIO charger is using a mix of the legacy GPIO interface
> and <linux/of_gpio.h> which is not the modern way to use GPIOs.
>
> Refactor like this:
>
> - Use a GPIO descriptor for the GPIO line used to monitor the
> charger.
> - Fetch the descriptor with devm_gpiod_get() as the first
> method.
> - If this fails and we are *not* using device tree, then
> start looking to see if we can use platform data instead.
> - After looking up and requesting a GPIO number with the
> legacy API, convert it to a descriptor.
>
> This way we can later isolate and drop the legacy code as
> more platforms move over to using descriptors.
>
> Cc: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Lars-Peter Clausen <lars@metafoo.de>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Thanks for your patch. I have queued it into power-supply's
for-next branch:
https://git.kernel.org/cgit/linux/kernel/git/sre/linux-power-supply.git/log/?h=for-next
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-01-04 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-26 20:18 [PATCH RESEND] power: gpio_charger: switch to using GPIO descriptors Linus Walleij
2017-01-04 21:20 ` Sebastian Reichel [this message]
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=20170104212046.egsccncbvaidioss@earth \
--to=sre@kernel.org \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=heiko@sntech.de \
--cc=lars@metafoo.de \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.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