Thread (13 messages) 13 messages, 3 authors, 2015-04-01

Re: [PATCH 2/2] pinctrl: Add Pistachio SoC pin control driver

From: Linus Walleij <hidden>
Date: 2015-03-19 08:42:22
Also in: linux-devicetree, linux-mips, lkml

On Tue, Mar 17, 2015 at 5:56 PM, Andrew Bresticker
[off-list ref] wrote:
[Me]
quoted
Sorry if I don't really know how things work now... :(
It seems like a logical way to me.
(...)
4) The ->set_mux() op must set the proper function for the pin.
5) The ->set_mux() op must also disable the GPIO function for the pin.
To disable the GPIO function, the pinctrl driver must map the pin to a
GPIO bank/offset and disable the GPIO via the GPIO bank's GPIO_EN
register.
That sounds like the"GPIO" registers are actually involved in any
muxing usecase, meaning there is not really a clean split between
the pinctrl and GPIO hardware, the case I refer to as "GPIO mode
pitfalls" in Documentation/pinctrl.txt.

In such cases both halves of the driver(s) need to be aware of
the other, and that is what you seem to be wanting to achieve.

So I was wrong in thinking the GPIO device could be a separate
subdevice, the two parts are too dependent on each other.
So keep a single probe() function and let the two driver halves
poke into each others' registers.

Sorry for the fuzz...

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