Title: [8978] trunk: [#6077] set reset gpio high for ad183x when board init
- Revision
- 8978
- Author
- bhsong
- Date
- 2010-07-07 23:12:36 -0400 (Wed, 07 Jul 2010)
Log Message
[#6077] set reset gpio high for ad183x when board init
Modified Paths
Diff
Modified: trunk/arch/blackfin/mach-bf561/boards/ezkit.c (8977 => 8978)
--- trunk/arch/blackfin/mach-bf561/boards/ezkit.c 2010-07-06 15:39:09 UTC (rev 8977)
+++ trunk/arch/blackfin/mach-bf561/boards/ezkit.c 2010-07-08 03:12:36 UTC (rev 8978)
@@ -14,6 +14,7 @@
#include <linux/spi/spi.h>
#include <linux/irq.h>
#include <linux/interrupt.h>
+#include <linux/delay.h>
#include <asm/dma.h>
#include <asm/bfin5xx_spi.h>
#include <asm/portmux.h>
@@ -522,6 +523,17 @@
SSYNC();
#endif
+#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
+ bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
+ bfin_write_FIO0_FLAG_S(1 << 15);
+ SSYNC();
+ /*
+ * This initialization lasts for approximately 4500 MCLKs.
+ * MCLK = 12.288MHz
+ */
+ udelay(400);
+#endif
+
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
return 0;
}
Modified: trunk/sound/soc/blackfin/bf5xx-ad183x.c (8977 => 8978)
--- trunk/sound/soc/blackfin/bf5xx-ad183x.c 2010-07-06 15:39:09 UTC (rev 8977)
+++ trunk/sound/soc/blackfin/bf5xx-ad183x.c 2010-07-08 03:12:36 UTC (rev 8978)
@@ -97,16 +97,6 @@
{
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;
@@ -118,16 +108,12 @@
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