Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1486782 > unrolled thread
| Started by | Sebastian Reichel <sre@kernel.org> |
|---|---|
| First post | 2016-09-19 21:20 +0200 |
| Last post | 2016-09-19 21:40 +0200 |
| Articles | 2 — 2 participants |
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.
Re: [PATCH] power: gpio_charger: switch to using GPIO descriptors Sebastian Reichel <sre@kernel.org> - 2016-09-19 21:20 +0200
Re: [PATCH] power: gpio_charger: switch to using GPIO descriptors Linus Walleij <linus.walleij@linaro.org> - 2016-09-19 21:40 +0200
| From | Sebastian Reichel <sre@kernel.org> |
|---|---|
| Date | 2016-09-19 21:20 +0200 |
| Subject | Re: [PATCH] power: gpio_charger: switch to using GPIO descriptors |
| Message-ID | <sjcgG-10E-15@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi Linus, On Fri, Sep 09, 2016 at 01:40:04PM +0200, 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> > --- > I would be very happy if some people can test this. I think > only the chromebook use it from device tree, but I'm equally > interested in the legacy usecase to work as nice as before. Since this is not tested on any hardware and we're already at rc7, I would prefer to take this after the merge window. Any reason this should go into v4.9? > drivers/power/gpio-charger.c | 84 ++++++++++++++++++++++++++------------------ > 1 file changed, 50 insertions(+), 34 deletions(-) This is obviously not based on power-supply's next branch, since I moved all drivers to drivers/power/supply. -- Sebastian
[toc] | [next] | [standalone]
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Date | 2016-09-19 21:40 +0200 |
| Message-ID | <sjcA1-17g-5@gated-at.bofh.it> |
| In reply to | #1486782 |
On Mon, Sep 19, 2016 at 9:18 PM, Sebastian Reichel <sre@kernel.org> wrote: > On Fri, Sep 09, 2016 at 01:40:04PM +0200, 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> >> --- >> I would be very happy if some people can test this. I think >> only the chromebook use it from device tree, but I'm equally >> interested in the legacy usecase to work as nice as before. > > Since this is not tested on any hardware and we're already > at rc7, I would prefer to take this after the merge window. > Any reason this should go into v4.9? No, there is no hurry. >> drivers/power/gpio-charger.c | 84 ++++++++++++++++++++++++++------------------ >> 1 file changed, 50 insertions(+), 34 deletions(-) > > This is obviously not based on power-supply's next branch, since > I moved all drivers to drivers/power/supply. I will rebase and resend after v4.9-rc1 then. Yours, Linus Walleij
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web