lkml.org 
[lkml]   [2010]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 3/3] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input
Date
On Friday 26 February 2010, Ben Gardner wrote:
> We need to read back the value written to the GPIO pin to control the
> MIC input enable.

There are two potential values associated with GPIO outputs:

- The value you wrote to it, which you should just remember.
This value should *NEVER* be returned through the GPIO calls.

- The value at the pin, which will *often* be the same as
what you wrote to it ... except for open drain signals
or other "multi-drive" cases. Or if you try to read the
value back before it gets latched. (It's common to have
the "latch value" step be clocked by something ... and to
have multiple clock domains, so latching might not sync
up with what your CPU is doing.)

From other patches recently landing in my mailbox, I'm thinking
that your GPIO driver isn't behaving properly ... it should return
the second value.


> Use gpio_set_direction() to set the GPIO in bidirectional mode.

NAK. THere is no such call, and should never be one.




\
 
 \ /
  Last update: 2010-02-27 08:17    [W:0.185 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site