Messages in this thread | | | From | David Brownell <> | Subject | Re: [PATCH 3/3] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input | Date | Fri, 26 Feb 2010 23:14:35 -0800 |
| |
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.
| |