From 5633fb73f3d6672c0cc3805663c8aea2eec68f19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Mon, 9 Jan 2012 18:53:25 +0800 Subject: [PATCH] wm8994: add gpio config about all board --- arch/arm/mach-rk29/board-rk29-a22.c | 19 ++++++++++--------- arch/arm/mach-rk29/board-rk29-td8801_v2.c | 19 ++++++++++--------- arch/arm/mach-rk29/board-rk29-z5.c | 19 ++++++++++--------- arch/arm/mach-rk29/board-rk29phonepadsdk.c | 19 ++++++++++--------- sound/soc/codecs/wm8994.c | 8 ++++---- 5 files changed, 44 insertions(+), 40 deletions(-) diff --git a/arch/arm/mach-rk29/board-rk29-a22.c b/arch/arm/mach-rk29/board-rk29-a22.c index 3eb43ff086bd..30b8de40e986 100755 --- a/arch/arm/mach-rk29/board-rk29-a22.c +++ b/arch/arm/mach-rk29/board-rk29-a22.c @@ -1753,20 +1753,21 @@ static struct wm8994_pdata wm8994_platform_data = { #if defined (CONFIG_GPIO_WM8994) .gpio_base = WM8994_GPIO_EXPANDER_BASE, //Fill value to initialize the GPIO - .gpio_defaults ={}, -#endif + //.gpio_defaults ={}, /* configure gpio1 function: 0x0001(Logic level input/output) */ // .gpio_defaults[0] = 0x0001, /* configure gpio3/4/5/7 function for AIF2 voice */ -// .gpio_defaults[2] = 0x8100, -// .gpio_defaults[3] = 0x8100, -// .gpio_defaults[4] = 0x8100, + .gpio_defaults[2] = 0x2100, + .gpio_defaults[3] = 0x2100, + .gpio_defaults[4] = 0xA100, // .gpio_defaults[6] = 0x0100, /* configure gpio8/9/10/11 function for AIF3 BT */ -// .gpio_defaults[7] = 0x8100, -// .gpio_defaults[8] = 0x0100, -// .gpio_defaults[9] = 0x0100, -// .gpio_defaults[10] = 0x0100, + .gpio_defaults[7] = 0xA100, + .gpio_defaults[8] = 0x2100, + .gpio_defaults[9] = 0x2100, + .gpio_defaults[10] = 0x2100, +#endif + .ldo[0] = { RK29_PIN5_PA1, NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */ .ldo[1] = { 0, NULL, &wm8994_ldo2_data }, diff --git a/arch/arm/mach-rk29/board-rk29-td8801_v2.c b/arch/arm/mach-rk29/board-rk29-td8801_v2.c index 200a4eafc655..32b488de50c9 100755 --- a/arch/arm/mach-rk29/board-rk29-td8801_v2.c +++ b/arch/arm/mach-rk29/board-rk29-td8801_v2.c @@ -1709,20 +1709,21 @@ static struct wm8994_pdata wm8994_platform_data = { #if defined (CONFIG_GPIO_WM8994) .gpio_base = WM8994_GPIO_EXPANDER_BASE, //Fill value to initialize the GPIO - .gpio_defaults ={}, -#endif +// .gpio_defaults ={}, /* configure gpio1 function: 0x0001(Logic level input/output) */ // .gpio_defaults[0] = 0x0001, /* configure gpio3/4/5/7 function for AIF2 voice */ -// .gpio_defaults[2] = 0x8100, -// .gpio_defaults[3] = 0x8100, -// .gpio_defaults[4] = 0x8100, + .gpio_defaults[2] = 0x2100, + .gpio_defaults[3] = 0x2100, + .gpio_defaults[4] = 0xA100, // .gpio_defaults[6] = 0x0100, /* configure gpio8/9/10/11 function for AIF3 BT */ -// .gpio_defaults[7] = 0x8100, -// .gpio_defaults[8] = 0x0100, -// .gpio_defaults[9] = 0x0100, -// .gpio_defaults[10] = 0x0100, + .gpio_defaults[7] = 0xA100, + .gpio_defaults[8] = 0x2100, + .gpio_defaults[9] = 0x2100, + .gpio_defaults[10] = 0x2100, +#endif + .ldo[0] = { RK29_PIN5_PA1, NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */ .ldo[1] = { 0, NULL, &wm8994_ldo2_data }, diff --git a/arch/arm/mach-rk29/board-rk29-z5.c b/arch/arm/mach-rk29/board-rk29-z5.c index d6eae2c19407..5817b15873cb 100644 --- a/arch/arm/mach-rk29/board-rk29-z5.c +++ b/arch/arm/mach-rk29/board-rk29-z5.c @@ -1935,20 +1935,21 @@ static struct wm8994_pdata wm8994_platform_data = { #if defined (CONFIG_GPIO_WM8994) .gpio_base = WM8994_GPIO_EXPANDER_BASE, //Fill value to initialize the GPIO - .gpio_defaults ={}, -#endif +// .gpio_defaults ={}, /* configure gpio1 function: 0x0001(Logic level input/output) */ // .gpio_defaults[0] = 0x0001, /* configure gpio3/4/5/7 function for AIF2 voice */ -// .gpio_defaults[2] = 0x8100, -// .gpio_defaults[3] = 0x8100, -// .gpio_defaults[4] = 0x8100, + .gpio_defaults[2] = 0x2100, + .gpio_defaults[3] = 0x2100, + .gpio_defaults[4] = 0xA100, // .gpio_defaults[6] = 0x0100, /* configure gpio8/9/10/11 function for AIF3 BT */ -// .gpio_defaults[7] = 0x8100, -// .gpio_defaults[8] = 0x0100, -// .gpio_defaults[9] = 0x0100, -// .gpio_defaults[10] = 0x0100, + .gpio_defaults[7] = 0xA100, + .gpio_defaults[8] = 0x2100, + .gpio_defaults[9] = 0x2100, + .gpio_defaults[10] = 0x2100, +#endif + .ldo[0] = { RK29_PIN5_PA1, NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */ .ldo[1] = { 0, NULL, &wm8994_ldo2_data }, diff --git a/arch/arm/mach-rk29/board-rk29phonepadsdk.c b/arch/arm/mach-rk29/board-rk29phonepadsdk.c index 313513872cfe..4df7bbeb5fda 100755 --- a/arch/arm/mach-rk29/board-rk29phonepadsdk.c +++ b/arch/arm/mach-rk29/board-rk29phonepadsdk.c @@ -883,20 +883,21 @@ static struct wm8994_pdata wm8994_platform_data = { #if defined (CONFIG_GPIO_WM8994) .gpio_base = WM8994_GPIO_EXPANDER_BASE, //Fill value to initialize the GPIO - .gpio_defaults ={}, -#endif +// .gpio_defaults ={}, /* configure gpio1 function: 0x0001(Logic level input/output) */ // .gpio_defaults[0] = 0x0001, /* configure gpio3/4/5/7 function for AIF2 voice */ -// .gpio_defaults[2] = 0x8100, -// .gpio_defaults[3] = 0x8100, -// .gpio_defaults[4] = 0x8100, + .gpio_defaults[2] = 0x2100, + .gpio_defaults[3] = 0x2100, + .gpio_defaults[4] = 0xA100, // .gpio_defaults[6] = 0x0100, /* configure gpio8/9/10/11 function for AIF3 BT */ -// .gpio_defaults[7] = 0x8100, -// .gpio_defaults[8] = 0x0100, -// .gpio_defaults[9] = 0x0100, -// .gpio_defaults[10] = 0x0100, + .gpio_defaults[7] = 0xA100, + .gpio_defaults[8] = 0x2100, + .gpio_defaults[9] = 0x2100, + .gpio_defaults[10] = 0x2100, +#endif + .ldo[0] = { RK29_PIN5_PA1, NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */ .ldo[1] = { 0, NULL, &wm8994_ldo2_data }, diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 778f98a103f2..fd0fd1e3d1ee 100755 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -148,8 +148,8 @@ static int wm8994_write(struct snd_soc_codec *codec, unsigned int reg, unsigned int value) { int ret; - if(reg == 0x3 || reg == 0x208) - debug_write_read = 1; +// if(reg == 0x3 || reg == 0x208) +// debug_write_read = 1; BUG_ON(reg > WM8994_MAX_REGISTER); #ifdef WM8994_PROC @@ -167,8 +167,8 @@ static int wm8994_write(struct snd_soc_codec *codec, unsigned int reg, DBG("snd_soc_cache_write:0x%04x = 0x%04x\n",reg,value); #endif } - if(reg == 0x3 || reg == 0x208) - debug_write_read = 0; +// if(reg == 0x3 || reg == 0x208) +// debug_write_read = 0; return wm8994_reg_write(codec->control_data, reg, value); } -- 2.34.1