wm8994: add gpio config about all board
author邱建斌 <qjb@rock-chips.com>
Mon, 9 Jan 2012 10:53:25 +0000 (18:53 +0800)
committer邱建斌 <qjb@rock-chips.com>
Mon, 9 Jan 2012 10:53:25 +0000 (18:53 +0800)
arch/arm/mach-rk29/board-rk29-a22.c
arch/arm/mach-rk29/board-rk29-td8801_v2.c
arch/arm/mach-rk29/board-rk29-z5.c
arch/arm/mach-rk29/board-rk29phonepadsdk.c
sound/soc/codecs/wm8994.c

index 3eb43ff086bd5487922480eab57369e123ce6e95..30b8de40e98652600acc01744f24eb590040787f 100755 (executable)
@@ -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 },
 
index 200a4eafc6552fdd31bc70e10ecf556cc101a516..32b488de50c94113bbeecf708f2e39658b8d6716 100755 (executable)
@@ -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 },
 
index d6eae2c19407f6c7b9ebf25e44989784fa6a0501..5817b15873cb05b808ac51a424ab7fc88c803913 100644 (file)
@@ -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 },
 
index 313513872cfeecd3d1e5ea14b1e77c184d121caf..4df7bbeb5fda61d99d2784f2b8d45d6e89c0fee7 100755 (executable)
@@ -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 },
 
index 778f98a103f21b31e4fe7d3e182c6723fda7ed96..fd0fd1e3d1ee9ff87fc4be13ac5eabb15dd0f999 100755 (executable)
@@ -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);
 }