打开18信息机的8994使能脚,关闭耳机检测部分打印,解决释放IRQ错误
authorChenJQ <chenjq@rock-chips.com>
Wed, 1 Sep 2010 12:21:03 +0000 (05:21 -0700)
committerChenJQ <chenjq@rock-chips.com>
Wed, 1 Sep 2010 12:21:03 +0000 (05:21 -0700)
arch/arm/mach-rk2818/board-infosdk.c
drivers/headset_observe/rk2818_headset.c

index 0d756b3b9a1c832fefc62f13cd29e2f72d2ed62c..c432f6c9e8ab5c1c28c2905a4b6c0737d56dc483 100755 (executable)
@@ -358,6 +358,11 @@ struct rk2818_gpio_expander_info  extgpio_tca6424_settinginfo[] = {
                .pin_type           = GPIO_OUT,
                .pin_value                      = GPIO_LOW,
         }, 
+        {
+               .gpio_num               = TCA6424_P11,
+               .pin_type           = GPIO_OUT,
+               .pin_value                      = GPIO_HIGH,
+        }, 
         {
                .gpio_num               = TCA6424_P12,
                .pin_type           = GPIO_IN,
index 2161a12954bcf1557c191270342a244fd0fb64f4..8bbf1e0567e345ee03dcff588c48e66c0d15f739 100644 (file)
@@ -38,7 +38,7 @@
 #include "rk2818_headset.h"
 
 /* Debug */
-#if 1
+#if 0
 #define DBG    printk
 #else
 #define DBG
@@ -140,16 +140,12 @@ static int rockchip_headsetobserve_probe(struct platform_device *pdev)
 
        prk2818_headset_info->irq = gpio_to_irq(prk2818_headset_info->irq);
        headset_irq_type = prk2818_headset_info->irq_type;
-       headsetobserve_work();
-
-       if(headset_irq_type == (IRQF_TRIGGER_FALLING|IRQF_TRIGGER_RISING)){
-               free_irq(prk2818_headset_info->irq,NULL);
-               ret = request_irq(prk2818_headset_info->irq, headset_interrupt, headset_irq_type, NULL, NULL);
-               if (ret ) {
-                       DBG("headsetobserve: request irq failed\n");
+       ret = request_irq(prk2818_headset_info->irq, headset_interrupt, headset_irq_type, NULL, NULL);
+       if (ret ) {
+               DBG("headsetobserve: request irq failed\n");
                return ret;
-               }
        }
+       headsetobserve_work();
 
        return 0;       
 }