From: Jani Nikula <[email protected]>

Make ESD check usage configurable in DSI panel data, as opposed to a

Signed-off-by: Jani Nikula <[email protected]>
---
 drivers/video/omap2/displays/panel-taal.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/video/omap2/displays/panel-taal.c 
b/drivers/video/omap2/displays/panel-taal.c
index b68976b..f5a1422 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -62,7 +62,6 @@
 #define DCS_GET_ID2            0xdb
 #define DCS_GET_ID3            0xdc
 
-/* #define TAAL_USE_ESD_CHECK */
 #define TAAL_ESD_CHECK_PERIOD  msecs_to_jiffies(5000)
 
 static irqreturn_t taal_te_isr(int irq, void *data);
@@ -794,6 +793,7 @@ static void taal_power_off(struct omap_dss_device *dssdev)
 static int taal_enable(struct omap_dss_device *dssdev)
 {
        struct taal_data *td = dev_get_drvdata(&dssdev->dev);
+       struct nokia_dsi_panel_data *panel_data = get_panel_data(dssdev);
        int r;
 
        dev_dbg(&dssdev->dev, "enable\n");
@@ -814,9 +814,9 @@ static int taal_enable(struct omap_dss_device *dssdev)
        if (r)
                goto err;
 
-#ifdef TAAL_USE_ESD_CHECK
-       queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
-#endif
+       if (panel_data->use_esd_check)
+               queue_delayed_work(td->esd_wq, &td->esd_work,
+                               TAAL_ESD_CHECK_PERIOD);
 
        dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
 
@@ -886,6 +886,7 @@ err:
 static int taal_resume(struct omap_dss_device *dssdev)
 {
        struct taal_data *td = dev_get_drvdata(&dssdev->dev);
+       struct nokia_dsi_panel_data *panel_data = get_panel_data(dssdev);
        int r;
 
        dev_dbg(&dssdev->dev, "resume\n");
@@ -907,10 +908,9 @@ static int taal_resume(struct omap_dss_device *dssdev)
                dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
        } 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
+               if (panel_data->use_esd_check)
+                       queue_delayed_work(td->esd_wq, &td->esd_work,
+                                       TAAL_ESD_CHECK_PERIOD);
        }
 
        mutex_unlock(&td->lock);
-- 
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to