Re: [PATCH 0/4] Pinmux subsystem
From: Russell King - ARM Linux
Date: Tue May 10 2011 - 17:45:34 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/