aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays
diff options
context:
space:
mode:
authorJani Nikula <ext-jani.1.nikula@nokia.com>2010-04-12 03:23:46 -0400
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2010-08-03 08:18:48 -0400
commit4571a023f5e9b18ca79e67ae6135b26624589ed9 (patch)
tree0ffd536eaa6c3d0768d9b7428d0ee46eda659405 /drivers/video/omap2/displays
parentfed44b7af8d9ce4c2c3d10a2e22e34ab596568a4 (diff)
OMAP: DSS2: Taal: Change ESD work management
Move ESD work queuing and cancelling out of taal_power_on/off() to avoid problems related to taal_esd_work() calling the power on/off functions. Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r--drivers/video/omap2/displays/panel-taal.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 19b5975a2312..383003ca092d 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -654,7 +654,7 @@ static void taal_remove(struct omap_dss_device *dssdev)
654 taal_bl_update_status(bldev); 654 taal_bl_update_status(bldev);
655 backlight_device_unregister(bldev); 655 backlight_device_unregister(bldev);
656 656
657 cancel_delayed_work_sync(&td->esd_work); 657 cancel_delayed_work(&td->esd_work);
658 destroy_workqueue(td->esd_wq); 658 destroy_workqueue(td->esd_wq);
659 659
660 /* reset, to be sure that the panel is in a valid state */ 660 /* reset, to be sure that the panel is in a valid state */
@@ -725,10 +725,6 @@ static int taal_power_on(struct omap_dss_device *dssdev)
725 if (r) 725 if (r)
726 goto err; 726 goto err;
727 727
728#ifdef TAAL_USE_ESD_CHECK
729 queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
730#endif
731
732 td->enabled = 1; 728 td->enabled = 1;
733 729
734 if (!td->intro_printed) { 730 if (!td->intro_printed) {
@@ -758,8 +754,6 @@ static void taal_power_off(struct omap_dss_device *dssdev)
758 struct taal_data *td = dev_get_drvdata(&dssdev->dev); 754 struct taal_data *td = dev_get_drvdata(&dssdev->dev);
759 int r; 755 int r;
760 756
761 cancel_delayed_work(&td->esd_work);
762
763 r = taal_dcs_write_0(DCS_DISPLAY_OFF); 757 r = taal_dcs_write_0(DCS_DISPLAY_OFF);
764 if (!r) { 758 if (!r) {
765 r = taal_sleep_in(td); 759 r = taal_sleep_in(td);
@@ -801,6 +795,10 @@ static int taal_enable(struct omap_dss_device *dssdev)
801 if (r) 795 if (r)
802 goto err; 796 goto err;
803 797
798#ifdef TAAL_USE_ESD_CHECK
799 queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
800#endif
801
804 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 802 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
805 803
806 mutex_unlock(&td->lock); 804 mutex_unlock(&td->lock);
@@ -820,6 +818,8 @@ static void taal_disable(struct omap_dss_device *dssdev)
820 818
821 mutex_lock(&td->lock); 819 mutex_lock(&td->lock);
822 820
821 cancel_delayed_work(&td->esd_work);
822
823 dsi_bus_lock(); 823 dsi_bus_lock();
824 824
825 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) 825 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
@@ -846,6 +846,8 @@ static int taal_suspend(struct omap_dss_device *dssdev)
846 goto err; 846 goto err;
847 } 847 }
848 848
849 cancel_delayed_work(&td->esd_work);
850
849 dsi_bus_lock(); 851 dsi_bus_lock();
850 852
851 taal_power_off(dssdev); 853 taal_power_off(dssdev);
@@ -882,10 +884,15 @@ static int taal_resume(struct omap_dss_device *dssdev)
882 884
883 dsi_bus_unlock(); 885 dsi_bus_unlock();
884 886
885 if (r) 887 if (r) {
886 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; 888 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
887 else 889 } else {
888 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 890 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
891#ifdef TAAL_USE_ESD_CHECK
892 queue_delayed_work(td->esd_wq, &td->esd_work,
893 TAAL_ESD_CHECK_PERIOD);
894#endif
895 }
889 896
890 mutex_unlock(&td->lock); 897 mutex_unlock(&td->lock);
891 898