[PATCH 0/4] Pinmux subsystem

Russell King - ARM Linux linux at arm.linux.org.uk
Tue May 10 17:45:18 EDT 2011


On Tue, May 10, 2011 at 11:25:44PM +0200, Linus Walleij wrote:
> It can, basically:
> 
> struct pinmux *pmx;
> 
> pmx = pinmux_get(dev, "irda-uart");
> pinmux_enable(pmx);
> (... SIR UART operations ...)
> pinmux_disable(pmx);
> pinmux_put(pmx);
> (... stuff to init FIR silicon ...)
> pmx = pinmux_get(dev, "irda-fir");
> pinmux_enable(pmx);
> (... etc ...)

You really don't want to do this.  It's not that SIR and FIR are that
exclusive.  You only switch to FIR mode when you've negotiated in SIR
mode, and then there's tight timings for doing that.  Essentially you
agree in SIR mode to switch to FIR mode, switch to FIR mode and expect
a response in FIR mode from the remote end.

Calling out to lots of functions to perform the switch is asking for
that response to be missed because you've not set things up for it.

You'd want to have SIR and FIR mode 'got', and then switch as quickly
as possible between them.



More information about the linux-arm-kernel mailing list