public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@collabora.co.uk>
To: Ben Gardner <gardner.ben@gmail.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input
Date: Wed, 24 Feb 2010 18:45:05 -0500	[thread overview]
Message-ID: <20100224184505.1d8d3380@droptest.queued.net> (raw)
In-Reply-To: <808c8e9d1002231455q379b26acq4b4a50188c5d73be@mail.gmail.com>


Previously the MIC GPIO was set to output mode, and when checking the status
after setting it we were checking OUTPUT_VAL.  This worked, though I'm not
quite sure why.  Instead, if we actually check the READ_BACK value, it
doesn't work unless the GPIO is in bidirectional mode.  Thus, enable
input mode as well.

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
---
 sound/pci/cs5535audio/cs5535audio_olpc.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
index 50da49b..f5574f2 100644
--- a/sound/pci/cs5535audio/cs5535audio_olpc.c
+++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
@@ -157,6 +157,7 @@ int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
 		return -EIO;
 	}
 	gpio_direction_output(OLPC_GPIO_MIC_AC, 0);
+	gpio_direction_input(OLPC_GPIO_MIC_AC);
 
 	/* drop the original AD1888 HPF control */
 	memset(&elem, 0, sizeof(elem));
-- 
1.5.6.5


  parent reply	other threads:[~2010-02-24 23:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-23 22:55 [PATCH] cs5535_gpio: gpio_chip.get should return the input value Ben Gardner
2010-02-24 22:58 ` Andrew Morton
2010-02-25  3:52   ` Ben Gardner
2010-02-25  4:05     ` Andrew Morton
2010-02-25  4:16       ` Ben Gardner
2010-02-25  5:04         ` Andres Salomon
2010-02-24 23:42 ` Andres Salomon
2010-02-24 23:45 ` Andres Salomon [this message]
2010-02-26 17:47   ` [PATCH] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input Ben Gardner
2010-02-26 21:07     ` Andres Salomon
2010-02-26 23:32       ` Ben Gardner
2010-03-01 14:55         ` Ben Gardner
2010-03-01 15:17           ` Andres Salomon

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=20100224184505.1d8d3380@droptest.queued.net \
    --to=dilinger@collabora.co.uk \
    --cc=akpm@linux-foundation.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox