aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/displays
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-03-05 07:29:28 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-05-09 03:51:05 -0400
commit2e6f2ee7ace43d7c8d0e9abf9b0767ab99d3f2aa (patch)
treee3a3b3a56f0adb45e9e4e0f40c69245386622275 /drivers/video/omap2/displays
parente813a55eb9c9bc6c8039fb16332cf43402125b30 (diff)
OMAPDSS: TFP410: rename dvi -> tfp410
The driver for the TFP410 DPI-to-DVI chip was named quite badly as "DVI panel driver". This patch renames the code to use tfp410 name for the driver. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'drivers/video/omap2/displays')
-rw-r--r--drivers/video/omap2/displays/Kconfig8
-rw-r--r--drivers/video/omap2/displays/Makefile2
-rw-r--r--drivers/video/omap2/displays/panel-dvi.c94
3 files changed, 52 insertions, 52 deletions
diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig
index 408a9927be92..c3853c92279b 100644
--- a/drivers/video/omap2/displays/Kconfig
+++ b/drivers/video/omap2/displays/Kconfig
@@ -10,12 +10,12 @@ config PANEL_GENERIC_DPI
10 Supports LCD Panel used in TI SDP3430 and EVM boards, 10 Supports LCD Panel used in TI SDP3430 and EVM boards,
11 OMAP3517 EVM boards and CM-T35. 11 OMAP3517 EVM boards and CM-T35.
12 12
13config PANEL_DVI 13config PANEL_TFP410
14 tristate "DVI output" 14 tristate "TFP410 DPI-to-DVI chip"
15 depends on OMAP2_DSS_DPI && I2C 15 depends on OMAP2_DSS_DPI && I2C
16 help 16 help
17 Driver for external monitors, connected via DVI. The driver uses i2c 17 Driver for TFP410 DPI-to-DVI chip. The driver uses i2c to read EDID
18 to read EDID information from the monitor. 18 information from the monitor.
19 19
20config PANEL_LGPHILIPS_LB035Q02 20config PANEL_LGPHILIPS_LB035Q02
21 tristate "LG.Philips LB035Q02 LCD Panel" 21 tristate "LG.Philips LB035Q02 LCD Panel"
diff --git a/drivers/video/omap2/displays/Makefile b/drivers/video/omap2/displays/Makefile
index fbfafc6eebb4..58905ef010c6 100644
--- a/drivers/video/omap2/displays/Makefile
+++ b/drivers/video/omap2/displays/Makefile
@@ -1,5 +1,5 @@
1obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o 1obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o
2obj-$(CONFIG_PANEL_DVI) += panel-dvi.o 2obj-$(CONFIG_PANEL_TFP410) += panel-dvi.o
3obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o 3obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o
4obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o 4obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
5obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o 5obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o
diff --git a/drivers/video/omap2/displays/panel-dvi.c b/drivers/video/omap2/displays/panel-dvi.c
index 7e8cadd42fec..e6d6849a27de 100644
--- a/drivers/video/omap2/displays/panel-dvi.c
+++ b/drivers/video/omap2/displays/panel-dvi.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * DVI output support 2 * TFP410 DPI-to-DVI chip
3 * 3 *
4 * Copyright (C) 2011 Texas Instruments Inc 4 * Copyright (C) 2011 Texas Instruments Inc
5 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> 5 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com>
@@ -26,7 +26,7 @@
26 26
27#include <video/omap-panel-dvi.h> 27#include <video/omap-panel-dvi.h>
28 28
29static const struct omap_video_timings panel_dvi_default_timings = { 29static const struct omap_video_timings tfp410_default_timings = {
30 .x_res = 640, 30 .x_res = 640,
31 .y_res = 480, 31 .y_res = 480,
32 32
@@ -49,13 +49,13 @@ struct panel_drv_data {
49 int pd_gpio; 49 int pd_gpio;
50}; 50};
51 51
52static inline struct panel_dvi_platform_data 52static inline struct tfp410_platform_data
53*get_pdata(const struct omap_dss_device *dssdev) 53*get_pdata(const struct omap_dss_device *dssdev)
54{ 54{
55 return dssdev->data; 55 return dssdev->data;
56} 56}
57 57
58static int panel_dvi_power_on(struct omap_dss_device *dssdev) 58static int tfp410_power_on(struct omap_dss_device *dssdev)
59{ 59{
60 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 60 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
61 int r; 61 int r;
@@ -75,7 +75,7 @@ err0:
75 return r; 75 return r;
76} 76}
77 77
78static void panel_dvi_power_off(struct omap_dss_device *dssdev) 78static void tfp410_power_off(struct omap_dss_device *dssdev)
79{ 79{
80 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 80 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
81 81
@@ -88,9 +88,9 @@ static void panel_dvi_power_off(struct omap_dss_device *dssdev)
88 omapdss_dpi_display_disable(dssdev); 88 omapdss_dpi_display_disable(dssdev);
89} 89}
90 90
91static int panel_dvi_probe(struct omap_dss_device *dssdev) 91static int tfp410_probe(struct omap_dss_device *dssdev)
92{ 92{
93 struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 93 struct tfp410_platform_data *pdata = get_pdata(dssdev);
94 struct panel_drv_data *ddata; 94 struct panel_drv_data *ddata;
95 int r; 95 int r;
96 96
@@ -98,7 +98,7 @@ static int panel_dvi_probe(struct omap_dss_device *dssdev)
98 if (!ddata) 98 if (!ddata)
99 return -ENOMEM; 99 return -ENOMEM;
100 100
101 dssdev->panel.timings = panel_dvi_default_timings; 101 dssdev->panel.timings = tfp410_default_timings;
102 dssdev->panel.config = OMAP_DSS_LCD_TFT; 102 dssdev->panel.config = OMAP_DSS_LCD_TFT;
103 103
104 ddata->dssdev = dssdev; 104 ddata->dssdev = dssdev;
@@ -124,7 +124,7 @@ static int panel_dvi_probe(struct omap_dss_device *dssdev)
124 return 0; 124 return 0;
125} 125}
126 126
127static void __exit panel_dvi_remove(struct omap_dss_device *dssdev) 127static void __exit tfp410_remove(struct omap_dss_device *dssdev)
128{ 128{
129 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 129 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
130 130
@@ -140,14 +140,14 @@ static void __exit panel_dvi_remove(struct omap_dss_device *dssdev)
140 kfree(ddata); 140 kfree(ddata);
141} 141}
142 142
143static int panel_dvi_enable(struct omap_dss_device *dssdev) 143static int tfp410_enable(struct omap_dss_device *dssdev)
144{ 144{
145 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 145 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
146 int r; 146 int r;
147 147
148 mutex_lock(&ddata->lock); 148 mutex_lock(&ddata->lock);
149 149
150 r = panel_dvi_power_on(dssdev); 150 r = tfp410_power_on(dssdev);
151 if (r == 0) 151 if (r == 0)
152 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 152 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
153 153
@@ -156,26 +156,26 @@ static int panel_dvi_enable(struct omap_dss_device *dssdev)
156 return r; 156 return r;
157} 157}
158 158
159static void panel_dvi_disable(struct omap_dss_device *dssdev) 159static void tfp410_disable(struct omap_dss_device *dssdev)
160{ 160{
161 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 161 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
162 162
163 mutex_lock(&ddata->lock); 163 mutex_lock(&ddata->lock);
164 164
165 panel_dvi_power_off(dssdev); 165 tfp410_power_off(dssdev);
166 166
167 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; 167 dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
168 168
169 mutex_unlock(&ddata->lock); 169 mutex_unlock(&ddata->lock);
170} 170}
171 171
172static int panel_dvi_suspend(struct omap_dss_device *dssdev) 172static int tfp410_suspend(struct omap_dss_device *dssdev)
173{ 173{
174 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 174 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
175 175
176 mutex_lock(&ddata->lock); 176 mutex_lock(&ddata->lock);
177 177
178 panel_dvi_power_off(dssdev); 178 tfp410_power_off(dssdev);
179 179
180 dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; 180 dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED;
181 181
@@ -184,14 +184,14 @@ static int panel_dvi_suspend(struct omap_dss_device *dssdev)
184 return 0; 184 return 0;
185} 185}
186 186
187static int panel_dvi_resume(struct omap_dss_device *dssdev) 187static int tfp410_resume(struct omap_dss_device *dssdev)
188{ 188{
189 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 189 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
190 int r; 190 int r;
191 191
192 mutex_lock(&ddata->lock); 192 mutex_lock(&ddata->lock);
193 193
194 r = panel_dvi_power_on(dssdev); 194 r = tfp410_power_on(dssdev);
195 if (r == 0) 195 if (r == 0)
196 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 196 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
197 197
@@ -200,7 +200,7 @@ static int panel_dvi_resume(struct omap_dss_device *dssdev)
200 return r; 200 return r;
201} 201}
202 202
203static void panel_dvi_set_timings(struct omap_dss_device *dssdev, 203static void tfp410_set_timings(struct omap_dss_device *dssdev,
204 struct omap_video_timings *timings) 204 struct omap_video_timings *timings)
205{ 205{
206 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 206 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
@@ -210,7 +210,7 @@ static void panel_dvi_set_timings(struct omap_dss_device *dssdev,
210 mutex_unlock(&ddata->lock); 210 mutex_unlock(&ddata->lock);
211} 211}
212 212
213static void panel_dvi_get_timings(struct omap_dss_device *dssdev, 213static void tfp410_get_timings(struct omap_dss_device *dssdev,
214 struct omap_video_timings *timings) 214 struct omap_video_timings *timings)
215{ 215{
216 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 216 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
@@ -220,7 +220,7 @@ static void panel_dvi_get_timings(struct omap_dss_device *dssdev,
220 mutex_unlock(&ddata->lock); 220 mutex_unlock(&ddata->lock);
221} 221}
222 222
223static int panel_dvi_check_timings(struct omap_dss_device *dssdev, 223static int tfp410_check_timings(struct omap_dss_device *dssdev,
224 struct omap_video_timings *timings) 224 struct omap_video_timings *timings)
225{ 225{
226 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 226 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
@@ -234,7 +234,7 @@ static int panel_dvi_check_timings(struct omap_dss_device *dssdev,
234} 234}
235 235
236 236
237static int panel_dvi_ddc_read(struct i2c_adapter *adapter, 237static int tfp410_ddc_read(struct i2c_adapter *adapter,
238 unsigned char *buf, u16 count, u8 offset) 238 unsigned char *buf, u16 count, u8 offset)
239{ 239{
240 int r, retries; 240 int r, retries;
@@ -265,11 +265,11 @@ static int panel_dvi_ddc_read(struct i2c_adapter *adapter,
265 return r < 0 ? r : -EIO; 265 return r < 0 ? r : -EIO;
266} 266}
267 267
268static int panel_dvi_read_edid(struct omap_dss_device *dssdev, 268static int tfp410_read_edid(struct omap_dss_device *dssdev,
269 u8 *edid, int len) 269 u8 *edid, int len)
270{ 270{
271 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 271 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
272 struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 272 struct tfp410_platform_data *pdata = get_pdata(dssdev);
273 struct i2c_adapter *adapter; 273 struct i2c_adapter *adapter;
274 int r, l, bytes_read; 274 int r, l, bytes_read;
275 275
@@ -289,7 +289,7 @@ static int panel_dvi_read_edid(struct omap_dss_device *dssdev,
289 } 289 }
290 290
291 l = min(EDID_LENGTH, len); 291 l = min(EDID_LENGTH, len);
292 r = panel_dvi_ddc_read(adapter, edid, l, 0); 292 r = tfp410_ddc_read(adapter, edid, l, 0);
293 if (r) 293 if (r)
294 goto err; 294 goto err;
295 295
@@ -299,7 +299,7 @@ static int panel_dvi_read_edid(struct omap_dss_device *dssdev,
299 if (len > EDID_LENGTH && edid[0x7e] > 0) { 299 if (len > EDID_LENGTH && edid[0x7e] > 0) {
300 l = min(EDID_LENGTH, len - EDID_LENGTH); 300 l = min(EDID_LENGTH, len - EDID_LENGTH);
301 301
302 r = panel_dvi_ddc_read(adapter, edid + EDID_LENGTH, 302 r = tfp410_ddc_read(adapter, edid + EDID_LENGTH,
303 l, EDID_LENGTH); 303 l, EDID_LENGTH);
304 if (r) 304 if (r)
305 goto err; 305 goto err;
@@ -316,10 +316,10 @@ err:
316 return r; 316 return r;
317} 317}
318 318
319static bool panel_dvi_detect(struct omap_dss_device *dssdev) 319static bool tfp410_detect(struct omap_dss_device *dssdev)
320{ 320{
321 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 321 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev);
322 struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 322 struct tfp410_platform_data *pdata = get_pdata(dssdev);
323 struct i2c_adapter *adapter; 323 struct i2c_adapter *adapter;
324 unsigned char out; 324 unsigned char out;
325 int r; 325 int r;
@@ -333,7 +333,7 @@ static bool panel_dvi_detect(struct omap_dss_device *dssdev)
333 if (!adapter) 333 if (!adapter)
334 goto out; 334 goto out;
335 335
336 r = panel_dvi_ddc_read(adapter, &out, 1, 0); 336 r = tfp410_ddc_read(adapter, &out, 1, 0);
337 337
338 mutex_unlock(&ddata->lock); 338 mutex_unlock(&ddata->lock);
339 339
@@ -344,38 +344,38 @@ out:
344 return true; 344 return true;
345} 345}
346 346
347static struct omap_dss_driver panel_dvi_driver = { 347static struct omap_dss_driver tfp410_driver = {
348 .probe = panel_dvi_probe, 348 .probe = tfp410_probe,
349 .remove = __exit_p(panel_dvi_remove), 349 .remove = __exit_p(tfp410_remove),
350 350
351 .enable = panel_dvi_enable, 351 .enable = tfp410_enable,
352 .disable = panel_dvi_disable, 352 .disable = tfp410_disable,
353 .suspend = panel_dvi_suspend, 353 .suspend = tfp410_suspend,
354 .resume = panel_dvi_resume, 354 .resume = tfp410_resume,
355 355
356 .set_timings = panel_dvi_set_timings, 356 .set_timings = tfp410_set_timings,
357 .get_timings = panel_dvi_get_timings, 357 .get_timings = tfp410_get_timings,
358 .check_timings = panel_dvi_check_timings, 358 .check_timings = tfp410_check_timings,
359 359
360 .read_edid = panel_dvi_read_edid, 360 .read_edid = tfp410_read_edid,
361 .detect = panel_dvi_detect, 361 .detect = tfp410_detect,
362 362
363 .driver = { 363 .driver = {
364 .name = "dvi", 364 .name = "tfp410",
365 .owner = THIS_MODULE, 365 .owner = THIS_MODULE,
366 }, 366 },
367}; 367};
368 368
369static int __init panel_dvi_init(void) 369static int __init tfp410_init(void)
370{ 370{
371 return omap_dss_register_driver(&panel_dvi_driver); 371 return omap_dss_register_driver(&tfp410_driver);
372} 372}
373 373
374static void __exit panel_dvi_exit(void) 374static void __exit tfp410_exit(void)
375{ 375{
376 omap_dss_unregister_driver(&panel_dvi_driver); 376 omap_dss_unregister_driver(&tfp410_driver);
377} 377}
378 378
379module_init(panel_dvi_init); 379module_init(tfp410_init);
380module_exit(panel_dvi_exit); 380module_exit(tfp410_exit);
381MODULE_LICENSE("GPL"); 381MODULE_LICENSE("GPL");