diff options
author | Erik Gilling <konkers@android.com> | 2011-04-11 15:15:15 -0700 |
---|---|---|
committer | Erik Gilling <konkers@android.com> | 2011-04-12 17:50:11 -0700 |
commit | bcc43282405c2329eb2e4e9e72ca9b0f5ea651ef (patch) | |
tree | b9f30406c22d1de5e01fc5816455f294374cba52 | |
parent | 98ed9cb6c4bc11a844edfb5d993568cbf77fe737 (diff) |
video: tegra: add debouncing to hdmi hotplug
Change-Id: Ic998e183e79faabc36d96720dcbae2640e8cf419
Signed-off-by: Erik Gilling <konkers@android.com>
-rw-r--r-- | drivers/video/tegra/dc/hdmi.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index 8ae17f97ab6f..ba2dc19072f9 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -494,10 +494,13 @@ static irqreturn_t tegra_dc_hdmi_irq(int irq, void *ptr) if (hdmi->suspended) { hdmi->hpd_pending = true; } else { + cancel_delayed_work(&hdmi->work); if (tegra_dc_hdmi_hpd(dc)) - schedule_delayed_work(&hdmi->work, msecs_to_jiffies(100)); + queue_delayed_work(system_nrt_wq, &hdmi->work, + msecs_to_jiffies(100)); else - schedule_delayed_work(&hdmi->work, msecs_to_jiffies(0)); + queue_delayed_work(system_nrt_wq, &hdmi->work, + msecs_to_jiffies(30)); } spin_unlock_irqrestore(&hdmi->suspend_lock, flags); @@ -524,9 +527,11 @@ static void tegra_dc_hdmi_resume(struct tegra_dc *dc) hdmi->suspended = false; if (hdmi->hpd_pending) { if (tegra_dc_hdmi_hpd(dc)) - schedule_delayed_work(&hdmi->work, msecs_to_jiffies(100)); + queue_delayed_work(system_nrt_wq, &hdmi->work, + msecs_to_jiffies(100)); else - schedule_delayed_work(&hdmi->work, msecs_to_jiffies(0)); + queue_delayed_work(system_nrt_wq, &hdmi->work, + msecs_to_jiffies(30)); hdmi->hpd_pending = false; } spin_unlock_irqrestore(&hdmi->suspend_lock, flags); |