[PATCH 1/5] powerpc/qe: Implement QE Pin Multiplexing API

Kumar Gala galak at kernel.crashing.org
Thu Dec 18 03:47:36 EST 2008


On Dec 3, 2008, at 1:27 PM, Anton Vorontsov wrote:

> With this API we're able to set a QE pin to the GPIO mode or a  
> dedicated
> peripheral function.
>
> The API relies on the fact that QE gpio controllers are registered. If
> they aren't, the API won't work (gracefully though).
>
> There is one caveat though: if anybody occupied the node->data  
> before us,
> or overwrote it, then bad things will happen. Luckily this is all in  
> the
> platform code that we fully control, so this should never happen.
>
> I could implement more checks (for example we could create a list of
> successfully registered QE controllers, and compare the node->data  
> in the
> qe_pin_request()), but this is unneeded if nobody is going to do silly
> things behind our back.
>
> Signed-off-by: Anton Vorontsov <avorontsov at ru.mvista.com>
> ---
> arch/powerpc/include/asm/qe.h     |   21 ++++
> arch/powerpc/sysdev/qe_lib/gpio.c |  195 ++++++++++++++++++++++++++++ 
> +++++++++
> 2 files changed, 216 insertions(+), 0 deletions(-)

applied to next

- k



More information about the Linuxppc-dev mailing list