Thread (4 messages) 4 messages, 3 authors, 2015-05-28

configuration for nc pins without pull

From: Linus Walleij <hidden>
Date: 2015-03-27 09:15:14
Also in: linux-gpio

On Sun, Mar 22, 2015 at 11:00 AM, Uwe Kleine-K?nig
[off-list ref] wrote:
for a machine I want to configure a pin that is actually not connected
to minimize floating. (I think this is sensible, isn't it?)
Yup, and Russell gave an excellent summary of why.
For the pinctrl I can use a hog group of the pinctrl device. At least
one of the pins doesn't have a pullup/pulldown configuration though, so
I want to mux it to its gpio function and set the gpio to output and the
desired value.

Is there something nicer than defining an always-on regulator with gpios
= <&gpio4 3 0> to accomplish that without additional code?
As explained in
Documentation/pinctrl.txt, section "GPIO mode pitfalls" like 788
this is not really "GPIO", it is a way of controlling the electric state
of the pin using software, it's just the hardware designers idea of the
use case that it is "GPIO", it is not what a software engineer would call
GPIO.

If the controller support GENERIC_PINCONF I suggest implementing
PIN_CONFIG_OUTPUT from include/linux/pinctrl/pinconf-generic.h
which is more or less for exactly this purpose.

It will bring the pin into "GPIO mode" by poking the right registers but
what is really happening is a non-GPIO usecase on the pin control
side of things.

This should be done using a hog on the device tree and
output-low; or output-high; using the generic pinctrl bindings.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help