[PATCH 3/3] OLPC: ALSA: fix cs5535audio's MIC GPIO to enable input

From: Ben Gardner
Date: Fri Feb 26 2010 - 18:27:10 EST


We need to read back the value written to the GPIO pin to control the
MIC input enable.
Use gpio_set_direction() to set the GPIO in bidirectional mode.

Signed-off-by: Ben Gardner <gardner.ben@xxxxxxxxx>
CC: Andres Salomon <dilinger@xxxxxxxxxxxxxxx>
CC: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
CC: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>
CC: Jani Nikula <ext-jani.1.nikula@xxxxxxxxx>
---
sound/pci/cs5535audio/cs5535audio_olpc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/pci/cs5535audio/cs5535audio_olpc.c b/sound/pci/cs5535audio/cs5535audio_olpc.c
index 50da49b..0c80e67 100644
--- a/sound/pci/cs5535audio/cs5535audio_olpc.c
+++ b/sound/pci/cs5535audio/cs5535audio_olpc.c
@@ -156,7 +156,7 @@ int __devinit olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97)
printk(KERN_ERR DRV_NAME ": unable to allocate MIC GPIO\n");
return -EIO;
}
- gpio_direction_output(OLPC_GPIO_MIC_AC, 0);
+ gpio_set_direction(OLPC_GPIO_MIC_AC, 3, 0);

/* drop the original AD1888 HPF control */
memset(&elem, 0, sizeof(elem));
--
1.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/