All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Ben Gardner <gardner.ben@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Andres Salomon <dilinger@collabora.co.uk>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jani Nikula <ext-jani.1.nikula@nokia.com>
Subject: Re: [PATCH 3/3] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input
Date: Fri, 26 Feb 2010 23:14:35 -0800	[thread overview]
Message-ID: <201002262314.35871.david-b@pacbell.net> (raw)
In-Reply-To: <45a4e62ae577ae6cabce7e243e675b5e7d994ec2.1267225701.git.gardner.ben@gmail.com>

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.



      reply	other threads:[~2010-02-27  7:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 23:26 [PATCH 0/3] gpio: add gpio_set_direction Ben Gardner
2010-02-26 23:26 ` [PATCH 1/3] gpiolib: add gpio_set_direction() Ben Gardner
2010-02-26 23:39   ` Andres Salomon
2010-02-27  5:11     ` Ben Gardner
2010-02-27  7:02   ` David Brownell
2010-02-27 10:26     ` Mark Brown
2010-02-27 16:24       ` David Brownell
2010-02-27 17:20         ` Mark Brown
2010-02-27 17:51           ` David Brownell
2010-03-01 10:35             ` Mark Brown
2010-02-27 18:36     ` Ben Gardner
2010-02-27 19:23       ` David Brownell
2010-02-27 18:36   ` [PATCH] cs5535-gpio: change input/output enable to match gpiolib expectations Ben Gardner
2010-02-27 18:40     ` Ben Gardner
2010-02-27 18:56   ` [PATCH v2] " Ben Gardner
2010-02-27 19:18     ` David Brownell
2010-02-26 23:26 ` [PATCH 2/3] cs5535-gpio: Use set_direction Ben Gardner
2010-02-27  7:04   ` David Brownell
2010-02-27 18:18     ` Ben Gardner
2010-02-26 23:26 ` [PATCH 3/3] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input Ben Gardner
2010-02-27  7:14   ` David Brownell [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201002262314.35871.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@linux-foundation.org \
    --cc=dilinger@collabora.co.uk \
    --cc=ext-jani.1.nikula@nokia.com \
    --cc=gardner.ben@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.