[PATCH 1/3] gpiolib: make gpio_to_chip() public

Laurent Pinchart laurentp at cse-semaphore.com
Fri Aug 15 00:45:52 EST 2008


On Thursday 14 August 2008, Anton Vorontsov wrote:
> On Thu, Aug 14, 2008 at 04:04:18PM +0200, Laurent Pinchart wrote:
> > On Friday 08 August 2008, Anton Vorontsov wrote:
> > > We'll need this function to write platform-specific hooks to deal
> > > with pin's dedicated functions. Quite obviously this will work only
> > > for the platforms with 1-to-1 GPIO to PIN mapping.
> > > 
> > > This is stopgap solution till we think out and implement a proper
> > > api (pinlib?).
> > 
> > How do you support reverting the GPIO mode to non-dedicated ?
> 
> As we always do with the GPIO API: gpio_direction_*() calls.

So the proper sequence to configure a pin in dedicated mode is to set the direction first (which will unset the dedicated mode bit) and then set dedicated mode (which will not touch the direction bit) ?

-- 
Laurent Pinchart
CSE Semaphore Belgium

Chaussee de Bruxelles, 732A
B-1410 Waterloo
Belgium

T +32 (2) 387 42 59
F +32 (2) 387 42 75
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080814/28d5cefb/attachment.pgp>


More information about the Linuxppc-dev mailing list