Title: [8972] trunk/sound/soc/blackfin/bf5xx-ad183x.c: [#6077] ASoC: set ad1836 reset on bf561-ezkit to high before using it
Revision
8972
Author
bhsong
Date
2010-07-06 03:27:27 -0400 (Tue, 06 Jul 2010)

Log Message

[#6077] ASoC: set ad1836 reset on bf561-ezkit to high before using it

Modified Paths

Diff

Modified: trunk/sound/soc/blackfin/bf5xx-ad183x.c (8971 => 8972)


--- trunk/sound/soc/blackfin/bf5xx-ad183x.c	2010-07-05 19:04:40 UTC (rev 8971)
+++ trunk/sound/soc/blackfin/bf5xx-ad183x.c	2010-07-06 07:27:27 UTC (rev 8972)
@@ -17,6 +17,7 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/device.h>
+#include <linux/gpio.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/soc.h>
@@ -96,6 +97,16 @@
 {
 	int ret;
 
+#ifdef CONFIG_BFIN561_EZKIT
+	ret = gpio_request(GPIO_PF15, "ad1836-rst");
+	if (ret) {
+		printk(KERN_ERR "could not get ad1836 reset gpio\n");
+		goto out;
+	} else {
+		gpio_direction_output(GPIO_PF15, 1);
+	}
+#endif
+
 	bfxx_ad183x_snd_device = platform_device_alloc("soc-audio", -1);
 	if (!bfxx_ad183x_snd_device)
 		return -ENOMEM;
@@ -107,12 +118,16 @@
 	if (ret)
 		platform_device_put(bfxx_ad183x_snd_device);
 
+out:
 	return ret;
 }
 
 static void __exit bf5xx_ad183x_exit(void)
 {
 	platform_device_unregister(bfxx_ad183x_snd_device);
+#ifdef CONFIG_BFIN561_EZKIT
+	gpio_free(GPIO_PF15);
+#endif
 }
 
 module_init(bf5xx_ad183x_init);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to