Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1551398 > unrolled thread

Re: [PATCH RESEND] power: gpio_charger: switch to using GPIO descriptors

Started bySebastian Reichel <sre@kernel.org>
First post2017-01-04 22:30 +0100
Last post2017-01-04 22:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH RESEND] power: gpio_charger: switch to using GPIO  descriptors Sebastian Reichel <sre@kernel.org> - 2017-01-04 22:30 +0100

#1551398 — Re: [PATCH RESEND] power: gpio_charger: switch to using GPIO descriptors

FromSebastian Reichel <sre@kernel.org>
Date2017-01-04 22:30 +0100
SubjectRe: [PATCH RESEND] power: gpio_charger: switch to using GPIO descriptors
Message-ID<sW1ia-1Pn-17@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web