taal_bl_update_status(bldev);
backlight_device_unregister(bldev);
- cancel_delayed_work_sync(&td->esd_work);
+ cancel_delayed_work(&td->esd_work);
destroy_workqueue(td->esd_wq);
/* reset, to be sure that the panel is in a valid state */
if (r)
goto err;
-#ifdef TAAL_USE_ESD_CHECK
- queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
-#endif
-
td->enabled = 1;
if (!td->intro_printed) {
struct taal_data *td = dev_get_drvdata(&dssdev->dev);
int r;
- cancel_delayed_work(&td->esd_work);
-
r = taal_dcs_write_0(DCS_DISPLAY_OFF);
if (!r) {
r = taal_sleep_in(td);
if (r)
goto err;
+#ifdef TAAL_USE_ESD_CHECK
+ queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
+#endif
+
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
mutex_unlock(&td->lock);
mutex_lock(&td->lock);
+ cancel_delayed_work(&td->esd_work);
+
dsi_bus_lock();
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
goto err;
}
+ cancel_delayed_work(&td->esd_work);
+
dsi_bus_lock();
taal_power_off(dssdev);
dsi_bus_unlock();
- if (r)
+ if (r) {
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
- else
+ } else {
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
+#ifdef TAAL_USE_ESD_CHECK
+ queue_delayed_work(td->esd_wq, &td->esd_work,
+ TAAL_ESD_CHECK_PERIOD);
+#endif
+ }
mutex_unlock(&td->lock);