2 * linux/arch/arm/mach-omap2/board-n800-audio.c
4 * Copyright (C) 2006 Nokia Corporation
6 * Jarkko Nikula <jarkko.nikula@nokia.com>
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24 #include <linux/err.h>
25 #include <linux/clk.h>
26 #include <linux/platform_device.h>
27 #include <linux/spi/tsc2301.h>
32 #include <mach/dsp_common.h>
34 void __init n800_audio_init(struct tsc2301_platform_data *tc)
38 #ifdef CONFIG_OMAP_DSP
40 int n800_audio_enable(struct dsp_kfunc_device *kdev, int stage)
46 spin_lock_irqsave(&audio_lock, flags);
48 pr_debug("DSP power up request (audio codec %sinitialized)\n",
49 audio_ok ? "" : "not ");
57 spin_unlock_irqrestore(&audio_lock, flags);
59 eac_set_mode(eac_device, 1, 1);
64 int n800_audio_disable(struct dsp_kfunc_device *kdev, int stage)
70 spin_lock_irqsave(&audio_lock, flags);
72 pr_debug("DSP power down request (audio codec %sinitialized)\n",
73 audio_ok ? "" : "not ");
81 spin_unlock_irqrestore(&audio_lock, flags);
83 eac_set_mode(eac_device, 0, 0);
88 #endif /* CONFIG_OMAP_DSP */