hdmi: rk616
authorxuhuicong <xhc@rock-chips.com>
Sat, 22 Jun 2013 07:41:46 +0000 (15:41 +0800)
committerxuhuicong <xhc@rock-chips.com>
Sat, 22 Jun 2013 07:41:46 +0000 (15:41 +0800)
release work queue and disable irq in rk616_hdmi_shutdown
to avid panic when shutdown

drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi.c
drivers/video/rockchip/hdmi/chips/rk616/rk616_hdmi_hw.c

index f9815f6a4de289480a64bc402efc4ba5a140796b..958cf1011329113198cb8969f3d329fd037485aa 100755 (executable)
@@ -355,9 +355,19 @@ static void rk616_hdmi_shutdown(struct platform_device *pdev)
        if(hdmi) {
 #ifdef CONFIG_HAS_EARLYSUSPEND
                unregister_early_suspend(&hdmi->early_suspend);
-#endif
-       }
-       printk(KERN_INFO "rk616 hdmi shut down.\n");
+#endif 
+                flush_delayed_work(&hdmi->delay_work);
+                mutex_lock(&hdmi->enable_mutex);
+                hdmi->suspend = 1;
+                if(!hdmi->enable) {
+                        mutex_unlock(&hdmi->enable_mutex);
+                        return;
+                }
+                if (hdmi->irq)
+                        disable_irq(hdmi->irq);
+                mutex_unlock(&hdmi->enable_mutex);
+        }
+        printk(KERN_INFO "rk616 hdmi shut down.\n");
 }
 
 static struct platform_driver rk616_hdmi_driver = {
index d2725567c83b8905271437b5fff88f4cf2890dff..0c2c24817f2e85ef3d1d43dc1f0b4a283398e1a1 100755 (executable)
@@ -439,7 +439,7 @@ void rk616_hdmi_work(void)
                if(hdmi->pwr_mode == LOWER_PWR)
                        rk616_hdmi_set_pwr_mode(NORMAL);
 
-               queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(10));   
+               queue_delayed_work(hdmi->workqueue, &hdmi->delay_work, msecs_to_jiffies(40));   
 
         }