summaryrefslogtreecommitdiff
path: root/target/linux/s3c24xx/files-2.6.30/sound/soc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2009-07-30 12:12:10 +0000
committerLars-Peter Clausen <lars@metafoo.de>2009-07-30 12:12:10 +0000
commit138024c0700c946e176d5f3fbd3c92f32f265134 (patch)
treee7f9ea5c7645e704e38b2e84f1283cabe0684e9a /target/linux/s3c24xx/files-2.6.30/sound/soc
parent23608e4c25923b9ebb2b4ba163ff2bafd2446568 (diff)
downloadmtk-20170518-138024c0700c946e176d5f3fbd3c92f32f265134.zip
mtk-20170518-138024c0700c946e176d5f3fbd3c92f32f265134.tar.gz
mtk-20170518-138024c0700c946e176d5f3fbd3c92f32f265134.tar.bz2
revert changes to gta02_wm8753.c in previous commit. They should not have been commited.
SVN-Revision: 17049
Diffstat (limited to 'target/linux/s3c24xx/files-2.6.30/sound/soc')
-rw-r--r--target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c48
1 files changed, 13 insertions, 35 deletions
diff --git a/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c b/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c
index 5f9ea7e..1f8f9db 100644
--- a/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c
+++ b/target/linux/s3c24xx/files-2.6.30/sound/soc/s3c24xx/gta02_wm8753.c
@@ -18,7 +18,6 @@
#include <linux/timer.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
-#include <linux/gpio.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -29,6 +28,8 @@
#include <plat/regs-iis.h>
#include <mach/regs-clock.h>
+#include <mach/regs-gpio.h>
+#include <mach/hardware.h>
#include <asm/io.h>
#include <mach/regs-gpioj.h>
#include <mach/gta02.h>
@@ -242,10 +243,10 @@ static int lm4853_set_spk(struct snd_kcontrol *kcontrol,
if (val) {
lm4853_state |= LM4853_SPK;
- gpio_set_value(GTA02_GPIO_HP_IN, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_HP_IN, 0);
} else {
lm4853_state &= ~LM4853_SPK;
- gpio_set_value(GTA02_GPIO_HP_IN, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_HP_IN, 1);
}
return 0;
@@ -264,10 +265,10 @@ static int lm4853_event(struct snd_soc_dapm_widget *w,
int event)
{
if (SND_SOC_DAPM_EVENT_ON(event))
- gpio_set_value(GTA02_GPIO_AMP_SHUT, 0);
+ s3c2410_gpio_setpin(GTA02_GPIO_AMP_SHUT, 0);
if (SND_SOC_DAPM_EVENT_OFF(event))
- gpio_set_value(GTA02_GPIO_AMP_SHUT, 1);
+ s3c2410_gpio_setpin(GTA02_GPIO_AMP_SHUT, 1);
return 0;
}
@@ -448,40 +449,19 @@ static int __init neo1973_gta02_init(void)
if (ret) {
platform_device_put(neo1973_gta02_snd_device);
- return 0;
+ return ret;
}
/* Initialise GPIOs used by amp */
- ret = gpio_request(GTA02_GPIO_HP_IN, "GTA02_HP_IN");
- if (ret) {
- pr_err("%s: Failed to register GPIO %d\n", __func__, GTA02_GPIO_HP_IN);
- goto err_unregister_device;
- }
+ s3c2410_gpio_cfgpin(GTA02_GPIO_HP_IN, S3C2410_GPIO_OUTPUT);
+ s3c2410_gpio_cfgpin(GTA02_GPIO_AMP_SHUT, S3C2410_GPIO_OUTPUT);
- ret = gpio_direction_output(GTA02_GPIO_HP_IN, 1);
- if (ret) {
- pr_err("%s: Failed to configure GPIO %d\n", __func__, GTA02_GPIO_HP_IN);
- goto err_unregister_device;
- }
+ /* Amp off by default */
+ s3c2410_gpio_setpin(GTA02_GPIO_AMP_SHUT, 1);
- ret = gpio_request(GTA02_GPIO_AMP_SHUT, "GTA02_AMP_SHUT");
- if (ret) {
- pr_err("%s: Failed to register GPIO %d\n", __func__, GTA02_GPIO_AMP_SHUT);
- goto err_free_gpio_hp_in;
- }
+ /* Speaker off by default */
+ s3c2410_gpio_setpin(GTA02_GPIO_HP_IN, 1);
- ret = gpio_direction_output(GTA02_GPIO_AMP_SHUT, 1);
- if (ret) {
- pr_err("%s: Failed to configure GPIO %d\n", __func__, GTA02_GPIO_AMP_SHUT);
- goto err_free_gpio_hp_in;
- }
-
-
- return 0;
-err_free_gpio_hp_in:
- gpio_free(GTA02_GPIO_HP_IN);
-err_unregister_device:
- platform_device_unregister(neo1973_gta02_snd_device);
return ret;
}
module_init(neo1973_gta02_init);
@@ -490,8 +470,6 @@ static void __exit neo1973_gta02_exit(void)
{
snd_soc_unregister_dai(&bt_dai);
platform_device_unregister(neo1973_gta02_snd_device);
- gpio_free(GTA02_GPIO_HP_IN);
- gpio_free(GTA02_GPIO_AMP_SHUT);
}
module_exit(neo1973_gta02_exit);