diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-03-24 07:58:01 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-05-11 07:20:44 -0400 |
commit | 33a410be6f4b760f0abe3ec05ac808f1c391bd41 (patch) | |
tree | e53fd02ae3f1deda1fb735abdded1eae3788eb81 /drivers/video/omap2/displays/panel-taal.c | |
parent | 88257b26953f73f30acf49587cb42b84be43c587 (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>
Diffstat (limited to 'drivers/video/omap2/displays/panel-taal.c')
-rw-r--r-- | drivers/video/omap2/displays/panel-taal.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 44d73f779ebe..788104c9998a 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c | |||
@@ -63,8 +63,6 @@ | |||
63 | #define DCS_GET_ID2 0xdb | 63 | #define DCS_GET_ID2 0xdb |
64 | #define DCS_GET_ID3 0xdc | 64 | #define DCS_GET_ID3 0xdc |
65 | 65 | ||
66 | #define TAAL_ESD_CHECK_PERIOD msecs_to_jiffies(5000) | ||
67 | |||
68 | static irqreturn_t taal_te_isr(int irq, void *data); | 66 | static irqreturn_t taal_te_isr(int irq, void *data); |
69 | static void taal_te_timeout_work_callback(struct work_struct *work); | 67 | static void taal_te_timeout_work_callback(struct work_struct *work); |
70 | static int _taal_enable_te(struct omap_dss_device *dssdev, bool enable); | 68 | static int _taal_enable_te(struct omap_dss_device *dssdev, bool enable); |
@@ -231,6 +229,7 @@ struct taal_data { | |||
231 | 229 | ||
232 | struct workqueue_struct *esd_wq; | 230 | struct workqueue_struct *esd_wq; |
233 | struct delayed_work esd_work; | 231 | struct delayed_work esd_work; |
232 | unsigned esd_interval; | ||
234 | 233 | ||
235 | struct panel_config *panel_config; | 234 | struct panel_config *panel_config; |
236 | }; | 235 | }; |
@@ -700,6 +699,7 @@ static int taal_probe(struct omap_dss_device *dssdev) | |||
700 | } | 699 | } |
701 | td->dssdev = dssdev; | 700 | td->dssdev = dssdev; |
702 | td->panel_config = panel_config; | 701 | td->panel_config = panel_config; |
702 | td->esd_interval = panel_data->esd_interval; | ||
703 | 703 | ||
704 | mutex_init(&td->lock); | 704 | mutex_init(&td->lock); |
705 | 705 | ||
@@ -963,7 +963,6 @@ static void taal_power_off(struct omap_dss_device *dssdev) | |||
963 | static int taal_enable(struct omap_dss_device *dssdev) | 963 | static int taal_enable(struct omap_dss_device *dssdev) |
964 | { | 964 | { |
965 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); | 965 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); |
966 | struct nokia_dsi_panel_data *panel_data = get_panel_data(dssdev); | ||
967 | int r; | 966 | int r; |
968 | 967 | ||
969 | dev_dbg(&dssdev->dev, "enable\n"); | 968 | dev_dbg(&dssdev->dev, "enable\n"); |
@@ -984,9 +983,9 @@ static int taal_enable(struct omap_dss_device *dssdev) | |||
984 | if (r) | 983 | if (r) |
985 | goto err; | 984 | goto err; |
986 | 985 | ||
987 | if (panel_data->use_esd_check) | 986 | if (td->esd_interval > 0) |
988 | queue_delayed_work(td->esd_wq, &td->esd_work, | 987 | queue_delayed_work(td->esd_wq, &td->esd_work, |
989 | TAAL_ESD_CHECK_PERIOD); | 988 | msecs_to_jiffies(td->esd_interval)); |
990 | 989 | ||
991 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | 990 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; |
992 | 991 | ||
@@ -1056,7 +1055,6 @@ err: | |||
1056 | static int taal_resume(struct omap_dss_device *dssdev) | 1055 | static int taal_resume(struct omap_dss_device *dssdev) |
1057 | { | 1056 | { |
1058 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); | 1057 | struct taal_data *td = dev_get_drvdata(&dssdev->dev); |
1059 | struct nokia_dsi_panel_data *panel_data = get_panel_data(dssdev); | ||
1060 | int r; | 1058 | int r; |
1061 | 1059 | ||
1062 | dev_dbg(&dssdev->dev, "resume\n"); | 1060 | dev_dbg(&dssdev->dev, "resume\n"); |
@@ -1078,9 +1076,9 @@ static int taal_resume(struct omap_dss_device *dssdev) | |||
1078 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; | 1076 | dssdev->state = OMAP_DSS_DISPLAY_DISABLED; |
1079 | } else { | 1077 | } else { |
1080 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; | 1078 | dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; |
1081 | if (panel_data->use_esd_check) | 1079 | if (td->esd_interval > 0) |
1082 | queue_delayed_work(td->esd_wq, &td->esd_work, | 1080 | queue_delayed_work(td->esd_wq, &td->esd_work, |
1083 | TAAL_ESD_CHECK_PERIOD); | 1081 | msecs_to_jiffies(td->esd_interval)); |
1084 | } | 1082 | } |
1085 | 1083 | ||
1086 | mutex_unlock(&td->lock); | 1084 | mutex_unlock(&td->lock); |
@@ -1523,7 +1521,8 @@ static void taal_esd_work(struct work_struct *work) | |||
1523 | 1521 | ||
1524 | dsi_bus_unlock(); | 1522 | dsi_bus_unlock(); |
1525 | 1523 | ||
1526 | queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD); | 1524 | queue_delayed_work(td->esd_wq, &td->esd_work, |
1525 | msecs_to_jiffies(td->esd_interval)); | ||
1527 | 1526 | ||
1528 | mutex_unlock(&td->lock); | 1527 | mutex_unlock(&td->lock); |
1529 | return; | 1528 | return; |
@@ -1536,7 +1535,8 @@ err: | |||
1536 | 1535 | ||
1537 | dsi_bus_unlock(); | 1536 | dsi_bus_unlock(); |
1538 | 1537 | ||
1539 | queue_delayed_work(td->esd_wq, &td->esd_work, TAAL_ESD_CHECK_PERIOD); | 1538 | queue_delayed_work(td->esd_wq, &td->esd_work, |
1539 | msecs_to_jiffies(td->esd_interval)); | ||
1540 | 1540 | ||
1541 | mutex_unlock(&td->lock); | 1541 | mutex_unlock(&td->lock); |
1542 | } | 1542 | } |