aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-03-24 13:58:01 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-05-11 14:20:44 +0300
commit33a410be6f4b760f0abe3ec05ac808f1c391bd41 (patch)
treee53fd02ae3f1deda1fb735abdded1eae3788eb81
parent88257b26953f73f30acf49587cb42b84be43c587 (diff)
OMAP: DSS2: Taal: Implement configurable ESD interval
ESD check in Taal driver is currently on/off feature with hardcoded interval. This patch changes it to a configurable interval, which can be set from the board file. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/displays/panel-taal.c20
-rw-r--r--include/video/omap-panel-nokia-dsi.h4
2 files changed, 12 insertions, 12 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c
index 44d73f779eb..788104c9998 100644
--- a/drivers/video/omap2/displays/panel-taal.c
+++ b/drivers/video/omap2/displays/panel-taal.c
@@ -63,8 +63,6 @@
#define DCS_GET_ID2 0xdb
#define DCS_GET_ID3 0xdc
-#define TAAL_ESD_CHECK_PERIOD msecs_to_jiffies(5000)
-
static irqreturn_t taal_te_isr(int irq, void *data);
static void taal_te_timeout_work_callback(struct work_struct *work);
static int _taal_enable_te(struct omap_dss_device *dssdev, bool enable);
@@ -231,6 +229,7 @@ struct taal_data {
struct workqueue_struct *esd_wq;
struct delayed_work esd_work;
+ unsigned esd_interval;
struct panel_config *panel_config;
};
@@ -700,6 +699,7 @@ static int taal_probe(struct omap_dss_device *dssdev)
}
td->dssdev = dssdev;
td->panel_config = panel_config;
+ td->esd_interval = panel_data->esd_interval;
mutex_init(&td->lock);
@@ -963,7 +963,6 @@ 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");
@@ -984,9 +983,9 @@ static int taal_enable(struct omap_dss_device *dssdev)
if (r)
goto err;
- if (panel_data->use_esd_check)
+ if (td->esd_interval > 0)
queue_delayed_work(td->esd_wq, &td->esd_work,
- TAAL_ESD_CHECK_PERIOD);
+ msecs_to_jiffies(td->esd_interval));
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
@@ -1056,7 +1055,6 @@ 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");
@@ -1078,9 +1076,9 @@ static int taal_resume(struct omap_dss_device *dssdev)
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
} else {
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
- if (panel_data->use_esd_check)
+ if (td->esd_interval > 0)
queue_delayed_work(td->esd_wq, &td->esd_work,
- TAAL_ESD_CHECK_PERIOD);
+ msecs_to_jiffies(td->esd_interval));
}
mutex_unlock(&td->lock);
@@ -1523,7 +1521,8 @@ static void taal_esd_work(struct work_struct *work)
dsi_bus_unlock();
- queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
+ queue_delayed_work(td->esd_wq, &td->esd_work,
+ msecs_to_jiffies(td->esd_interval));
mutex_unlock(&td->lock);
return;
@@ -1536,7 +1535,8 @@ err:
dsi_bus_unlock();
- queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD);
+ queue_delayed_work(td->esd_wq, &td->esd_work,
+ msecs_to_jiffies(td->esd_interval));
mutex_unlock(&td->lock);
}
diff --git a/include/video/omap-panel-nokia-dsi.h b/include/video/omap-panel-nokia-dsi.h
index e109b21e975..3bd8d231add 100644
--- a/include/video/omap-panel-nokia-dsi.h
+++ b/include/video/omap-panel-nokia-dsi.h
@@ -8,7 +8,7 @@ struct omap_dss_device;
* @name: panel name
* @use_ext_te: use external TE
* @ext_te_gpio: external TE GPIO
- * @use_esd_check: perform ESD checks
+ * @esd_interval: interval of ESD checks, 0 = disabled (ms)
* @max_backlight_level: maximum backlight level
* @set_backlight: pointer to backlight set function
* @get_backlight: pointer to backlight get function
@@ -21,7 +21,7 @@ struct nokia_dsi_panel_data {
bool use_ext_te;
int ext_te_gpio;
- bool use_esd_check;
+ unsigned esd_interval;
int max_backlight_level;
int (*set_backlight)(struct omap_dss_device *dssdev, int level);