mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
change for wm8994
This commit is contained in:
@@ -1066,6 +1066,7 @@ CONFIG_GPIOLIB=y
|
||||
# CONFIG_GPIO_PCA953X is not set
|
||||
# CONFIG_GPIO_PCF857X is not set
|
||||
CONFIG_GPIO_WM831X=y
|
||||
CONFIG_GPIO_WM8994=y
|
||||
|
||||
#
|
||||
# PCI GPIO expanders:
|
||||
@@ -1128,13 +1129,13 @@ CONFIG_MFD_CORE=y
|
||||
# CONFIG_MFD_TC6387XB is not set
|
||||
# CONFIG_MFD_TC6393XB is not set
|
||||
# CONFIG_PMIC_DA903X is not set
|
||||
# CONFIG_MFD_WM8994 is not set
|
||||
# CONFIG_MFD_WM8400 is not set
|
||||
CONFIG_MFD_WM831X=y
|
||||
# CONFIG_MFD_WM831X_I2C is not set
|
||||
CONFIG_MFD_WM831X_SPI=y
|
||||
# CONFIG_MFD_WM831X_SPI_A22 is not set
|
||||
# CONFIG_MFD_WM8350_I2C is not set
|
||||
CONFIG_MFD_WM8994=y
|
||||
# CONFIG_MFD_PCF50633 is not set
|
||||
# CONFIG_MFD_MC13783 is not set
|
||||
# CONFIG_AB3100_CORE is not set
|
||||
@@ -1147,6 +1148,7 @@ CONFIG_REGULATOR=y
|
||||
# CONFIG_REGULATOR_BQ24022 is not set
|
||||
# CONFIG_REGULATOR_MAX1586 is not set
|
||||
CONFIG_REGULATOR_WM831X=y
|
||||
CONFIG_REGULATOR_WM8994=y
|
||||
# CONFIG_REGULATOR_LP3971 is not set
|
||||
# CONFIG_REGULATOR_TPS65023 is not set
|
||||
# CONFIG_REGULATOR_TPS6507X is not set
|
||||
|
||||
@@ -51,8 +51,6 @@
|
||||
#include <linux/mfd/wm831x/pdata.h>
|
||||
#include <linux/mfd/wm831x/core.h>
|
||||
#include <linux/mfd/wm831x/gpio.h>
|
||||
#include <linux/mfd/wm8994/pdata.h>
|
||||
#include <linux/mfd/wm8994/registers.h>
|
||||
|
||||
#include <linux/mtd/nand.h>
|
||||
#include <linux/mtd/partitions.h>
|
||||
@@ -1696,35 +1694,6 @@ struct platform_device rk29_device_gps = {
|
||||
};
|
||||
#endif
|
||||
|
||||
/*****************************************************************************************
|
||||
* wm8994 codec
|
||||
* author: qjb@rock-chips.com
|
||||
*****************************************************************************************/
|
||||
struct wm8994_pdata wm8994_platdata = {
|
||||
|
||||
.BB_input_diff = 0,
|
||||
.BB_class = NO_PCM_BB,
|
||||
|
||||
.no_earpiece = 0,
|
||||
.sp_hp_same_channel = 0,
|
||||
|
||||
.PA_control_pin = 0,
|
||||
.Power_EN_Pin = RK29_PIN5_PA1,
|
||||
|
||||
.speaker_incall_vol = 0,
|
||||
.speaker_incall_mic_vol = -9,
|
||||
.speaker_normal_vol = 6,
|
||||
.earpiece_incall_vol = 0,
|
||||
.headset_incall_vol = 6,
|
||||
.headset_incall_mic_vol = -6,
|
||||
.headset_normal_vol = -6,
|
||||
.BT_incall_vol = 0,
|
||||
.BT_incall_mic_vol = 0,
|
||||
.recorder_vol = 30,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#ifdef CONFIG_RK_HEADSET_DET
|
||||
#define HEADSET_GPIO RK29_PIN4_PD2
|
||||
struct rk_headset_pdata rk_headset_info = {
|
||||
@@ -1935,9 +1904,6 @@ static struct i2c_board_info __initdata board_i2c0_devices[] = {
|
||||
.type = "wm8994",
|
||||
.addr = 0x1a,
|
||||
.flags = 0,
|
||||
// #if defined(CONFIG_MFD_WM8994)
|
||||
.platform_data = &wm8994_platdata,
|
||||
// #endif
|
||||
},
|
||||
#endif
|
||||
#if defined (CONFIG_BATTERY_STC3100)
|
||||
|
||||
@@ -61,8 +61,11 @@
|
||||
#define enable 1
|
||||
#define disable 0
|
||||
|
||||
extern int wm8994_set_status(void);
|
||||
|
||||
/*#ifdef CONFIG_SND_SOC_WM8994
|
||||
extern int wm8994_set_status(void);
|
||||
#endif
|
||||
*/
|
||||
/* headset private data */
|
||||
struct headset_priv {
|
||||
struct input_dev *input_dev;
|
||||
@@ -259,13 +262,13 @@ static void Hook_work(struct work_struct *work)
|
||||
DBG("Headset is out\n");
|
||||
goto RE_ERROR;
|
||||
}
|
||||
#ifdef CONFIG_SND_SOC_WM8994
|
||||
/*#ifdef CONFIG_SND_SOC_WM8994
|
||||
if(wm8994_set_status() < 0)
|
||||
{
|
||||
DBG("wm8994 is not set on heatset channel or suspend\n");
|
||||
goto RE_ERROR;
|
||||
}
|
||||
#endif
|
||||
#endif*/
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
level = gpio_get_value(pdata->Hook_gpio);
|
||||
@@ -326,7 +329,7 @@ static void headset_timer_callback(unsigned long arg)
|
||||
DBG("Headset is out\n");
|
||||
goto out;
|
||||
}
|
||||
#ifdef CONFIG_SND_SOC_WM8994
|
||||
/*#ifdef CONFIG_SND_SOC_WM8994
|
||||
if(wm8994_set_status() < 0)
|
||||
{
|
||||
DBG("wm8994 is not set on heatset channel\n");
|
||||
@@ -334,7 +337,7 @@ static void headset_timer_callback(unsigned long arg)
|
||||
add_timer(&headset_info->headset_timer);
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
#endif*/
|
||||
for(i=0; i<3; i++)
|
||||
{
|
||||
level = gpio_get_value(pdata->Hook_gpio);
|
||||
|
||||
@@ -165,7 +165,7 @@ static const struct snd_soc_dapm_route audio_map[]={
|
||||
/*
|
||||
* Logic for a rt5621 as connected on a rockchip board.
|
||||
*/
|
||||
static int rk29_wm8988_init(struct snd_soc_pcm_runtime *rtd)
|
||||
static int rk29_rt5621_init(struct snd_soc_pcm_runtime *rtd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -181,7 +181,7 @@ static struct snd_soc_dai_link rk29_dai = {
|
||||
.platform_name = "rockchip-audio",
|
||||
.cpu_dai_name = "rk29_i2s.0",
|
||||
.codec_dai_name = "RT5621 HiFi",
|
||||
.init = rk29_wm8988_init,
|
||||
.init = rk29_rt5621_init,
|
||||
.ops = &rk29_ops,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user