Skip to contentSkip to conversation

question: pin mux & gpio

DISCUSSION David Cohen 2 participants 3 messages Oct 24, 2013 – Oct 29, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

Hi,

I've got a question WRT pin muxing.
gpio-intel-mid registers are responsible to set alternative functions to some pins. Despite pin mux is not directly related to gpio in general, in this case it is.

Is there any other gpio driver doing this same task? Or maybe suggestion about how to handle it?

Br, David Cohen

#1 lore raw
Quoted 4 lines · David Cohen

I've got a question WRT pin muxing.
gpio-intel-mid registers are responsible to set alternative functions to some pins. Despite pin mux is not directly related to gpio in general, in this case it is.

I know this use case.

Quoted 2 lines

Is there any other gpio driver doing this same task? Or maybe suggestion about how to handle it?

First read Documentation/pinctrl.txt :-)

Move the driver to drivers/pinctrl/pinctrl-intel-mid.c in the next merge window, and add pin control interfaces in the style of the other combined pin control+GPIO drivers there. Keeping one state struct but exposing interfaces to both subsystems is perfectly acceptable. Use GPIO ranges to cross-reference GPIO lines to pins.

Yours,
Linus Walleij

#2 lore raw

Hi Linus,

Quoted 13 lines · Linus Walleij
Quoted 4 lines · David Cohen

I've got a question WRT pin muxing.
gpio-intel-mid registers are responsible to set alternative functions to some pins. Despite pin mux is not directly related to gpio in general, in this case it is.

I know this use case.

Quoted 2 lines

Is there any other gpio driver doing this same task? Or maybe suggestion about how to handle it?

Quoted 8 lines

First read Documentation/pinctrl.txt :-)

Move the driver to drivers/pinctrl/pinctrl-intel-mid.c in the next merge window, and add pin control interfaces in the style of the other combined pin control+GPIO drivers there. Keeping one state struct but exposing interfaces to both subsystems is perfectly acceptable. Use GPIO ranges to cross-reference GPIO lines to pins.

Thanks. I'll work on that change.

Br, David Cohen