Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1383467
| From | Linus Walleij <linus.walleij@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 8/8] gpio: stmpe: configure GPIO as output by default |
| Date | 2016-04-20 17:00 +0200 |
| Message-ID | <rq1LI-13P-9@gated-at.bofh.it> (permalink) |
| References | <rpCNk-6J2-3@gated-at.bofh.it> <rpCX0-6Oi-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Apr 19, 2016 at 2:18 PM, <patrice.chotard@st.com> wrote: > From: Patrice Chotard <patrice.chotard@st.com> > > Configures all GPIOs as output, in order to minimize power > consumption when GPIOs are unused. > > Signed-off-by: Amelie DELAUNAY <amelie.delaunay@st.com> > Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Not only do you set them all to outout but also: > + /* To minimize power consumption, configure unused GPIOs as outputs */ > + for (i = 0; i < stmpe_gpio->chip.ngpio; i++) > + stmpe_gpio_direction_output(&stmpe_gpio->chip, i, 0); You are driving them all low. Now GPIO is general purpose: what if they are connected to a line with a pull-up resistor? That is not saving power, instead consuming more than if you were setting them all to 1. I am afraid this is wrong. What you need is to be able to define in the DT (or similar) a set of initial values for the GPIO lines, and set them to 0 for this design. Such bindings have been discussed but no conclusion or merged patch has emerged. Please help out in driving a standard for this! Yours, Linus Walleij
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/8] STMPE fixes/rework and add STMPE1600 support <patrice.chotard@st.com> - 2016-04-19 14:30 +0200
[PATCH 7/8] gpio: stmpe: Add STMPE1600 support <patrice.chotard@st.com> - 2016-04-19 14:30 +0200
Re: [PATCH 7/8] gpio: stmpe: Add STMPE1600 support Linus Walleij <linus.walleij@linaro.org> - 2016-04-20 17:00 +0200
Re: [PATCH 7/8] gpio: stmpe: Add STMPE1600 support Patrice Chotard <patrice.chotard@st.com> - 2016-04-22 09:20 +0200
[PATCH 3/8] gpio: stmpe: fix edge and rising/falling edge detection <patrice.chotard@st.com> - 2016-04-19 14:30 +0200
Re: [PATCH 3/8] gpio: stmpe: fix edge and rising/falling edge detection kbuild test robot <lkp@intel.com> - 2016-04-19 14:40 +0200
Re: [PATCH 3/8] gpio: stmpe: fix edge and rising/falling edge detection Linus Walleij <linus.walleij@linaro.org> - 2016-04-20 16:40 +0200
Re: [PATCH 3/8] gpio: stmpe: fix edge and rising/falling edge detection Patrice Chotard <patrice.chotard@st.com> - 2016-04-21 15:50 +0200
[PATCH 8/8] gpio: stmpe: configure GPIO as output by default <patrice.chotard@st.com> - 2016-04-19 14:30 +0200
Re: [PATCH 8/8] gpio: stmpe: configure GPIO as output by default Linus Walleij <linus.walleij@linaro.org> - 2016-04-20 17:00 +0200
[PATCH 2/8] mfd: stmpe: Add reset support for all STMPE variant <patrice.chotard@st.com> - 2016-04-19 14:30 +0200
Re: [PATCH 2/8] mfd: stmpe: Add reset support for all STMPE variant Linus Walleij <linus.walleij@linaro.org> - 2016-04-20 16:40 +0200
Re: [PATCH 2/8] mfd: stmpe: Add reset support for all STMPE variant Lee Jones <lee.jones@linaro.org> - 2016-04-26 10:20 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Thierry Reding <thierry.reding@gmail.com> - 2016-04-19 14:50 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Marcel Ziswiler <marcel.ziswiler@toradex.com> - 2016-04-20 20:00 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Stephen Warren <swarren@wwwdotorg.org> - 2016-04-19 18:00 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Patrice Chotard <patrice.chotard@st.com> - 2016-04-20 09:50 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Stephen Warren <swarren@wwwdotorg.org> - 2016-04-20 18:10 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Marcel Ziswiler <marcel.ziswiler@toradex.com> - 2016-04-21 05:20 +0200
Re: [PATCH 0/8] STMPE fixes/rework and add STMPE1600 support Linus Walleij <linus.walleij@linaro.org> - 2016-04-20 16:30 +0200
csiph-web