Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+78 -78
+2 -2
arch/arm/mach-omap2/board-3430sdp.c
··· 157 157 .platform_disable = sdp3430_panel_disable_lcd, 158 158 }; 159 159 160 - static struct panel_dvi_platform_data dvi_panel = { 160 + static struct tfp410_platform_data dvi_panel = { 161 161 .power_down_gpio = -1, 162 162 }; 163 163 164 164 static struct omap_dss_device sdp3430_dvi_device = { 165 165 .name = "dvi", 166 166 .type = OMAP_DISPLAY_TYPE_DPI, 167 - .driver_name = "dvi", 167 + .driver_name = "tfp410", 168 168 .data = &dvi_panel, 169 169 .phy.dpi.data_lines = 24, 170 170 };
+2 -2
arch/arm/mach-omap2/board-am3517evm.c
··· 207 207 .platform_disable = am3517_evm_panel_disable_tv, 208 208 }; 209 209 210 - static struct panel_dvi_platform_data dvi_panel = { 210 + static struct tfp410_platform_data dvi_panel = { 211 211 .power_down_gpio = -1, 212 212 }; 213 213 214 214 static struct omap_dss_device am3517_evm_dvi_device = { 215 215 .type = OMAP_DISPLAY_TYPE_DPI, 216 216 .name = "dvi", 217 - .driver_name = "dvi", 217 + .driver_name = "tfp410", 218 218 .data = &dvi_panel, 219 219 .phy.dpi.data_lines = 24, 220 220 };
+2 -2
arch/arm/mach-omap2/board-cm-t35.c
··· 241 241 .phy.dpi.data_lines = 18, 242 242 }; 243 243 244 - static struct panel_dvi_platform_data dvi_panel = { 244 + static struct tfp410_platform_data dvi_panel = { 245 245 .power_down_gpio = CM_T35_DVI_EN_GPIO, 246 246 }; 247 247 248 248 static struct omap_dss_device cm_t35_dvi_device = { 249 249 .name = "dvi", 250 250 .type = OMAP_DISPLAY_TYPE_DPI, 251 - .driver_name = "dvi", 251 + .driver_name = "tfp410", 252 252 .data = &dvi_panel, 253 253 .phy.dpi.data_lines = 24, 254 254 };
+2 -2
arch/arm/mach-omap2/board-devkit8000.c
··· 141 141 .phy.dpi.data_lines = 24, 142 142 }; 143 143 144 - static struct panel_dvi_platform_data dvi_panel = { 144 + static struct tfp410_platform_data dvi_panel = { 145 145 .power_down_gpio = -1, 146 146 }; 147 147 148 148 static struct omap_dss_device devkit8000_dvi_device = { 149 149 .name = "dvi", 150 150 .type = OMAP_DISPLAY_TYPE_DPI, 151 - .driver_name = "dvi", 151 + .driver_name = "tfp410", 152 152 .data = &dvi_panel, 153 153 .phy.dpi.data_lines = 24, 154 154 };
+2 -2
arch/arm/mach-omap2/board-igep0020.c
··· 444 444 .setup = igep_twl_gpio_setup, 445 445 }; 446 446 447 - static struct panel_dvi_platform_data dvi_panel = { 447 + static struct tfp410_platform_data dvi_panel = { 448 448 .i2c_bus_num = 3, 449 449 .power_down_gpio = IGEP2_GPIO_DVI_PUP, 450 450 }; ··· 452 452 static struct omap_dss_device igep2_dvi_device = { 453 453 .type = OMAP_DISPLAY_TYPE_DPI, 454 454 .name = "dvi", 455 - .driver_name = "dvi", 455 + .driver_name = "tfp410", 456 456 .data = &dvi_panel, 457 457 .phy.dpi.data_lines = 24, 458 458 };
+2 -2
arch/arm/mach-omap2/board-omap3beagle.c
··· 189 189 190 190 /* DSS */ 191 191 192 - static struct panel_dvi_platform_data dvi_panel = { 192 + static struct tfp410_platform_data dvi_panel = { 193 193 .i2c_bus_num = 3, 194 194 .power_down_gpio = -1, 195 195 }; ··· 197 197 static struct omap_dss_device beagle_dvi_device = { 198 198 .type = OMAP_DISPLAY_TYPE_DPI, 199 199 .name = "dvi", 200 - .driver_name = "dvi", 200 + .driver_name = "tfp410", 201 201 .data = &dvi_panel, 202 202 .phy.dpi.data_lines = 24, 203 203 };
+2 -2
arch/arm/mach-omap2/board-omap3evm.c
··· 219 219 .platform_disable = omap3_evm_disable_tv, 220 220 }; 221 221 222 - static struct panel_dvi_platform_data dvi_panel = { 222 + static struct tfp410_platform_data dvi_panel = { 223 223 .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, 224 224 }; 225 225 226 226 static struct omap_dss_device omap3_evm_dvi_device = { 227 227 .name = "dvi", 228 228 .type = OMAP_DISPLAY_TYPE_DPI, 229 - .driver_name = "dvi", 229 + .driver_name = "tfp410", 230 230 .data = &dvi_panel, 231 231 .phy.dpi.data_lines = 24, 232 232 };
+2 -2
arch/arm/mach-omap2/board-omap3stalker.c
··· 119 119 .platform_disable = omap3_stalker_disable_tv, 120 120 }; 121 121 122 - static struct panel_dvi_platform_data dvi_panel = { 122 + static struct tfp410_platform_data dvi_panel = { 123 123 .power_down_gpio = DSS_ENABLE_GPIO, 124 124 }; 125 125 126 126 static struct omap_dss_device omap3_stalker_dvi_device = { 127 127 .name = "dvi", 128 128 .type = OMAP_DISPLAY_TYPE_DPI, 129 - .driver_name = "dvi", 129 + .driver_name = "tfp410", 130 130 .data = &dvi_panel, 131 131 .phy.dpi.data_lines = 24, 132 132 };
+2 -2
arch/arm/mach-omap2/board-omap4panda.c
··· 421 421 #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 422 422 423 423 /* Using generic display panel */ 424 - static struct panel_dvi_platform_data omap4_dvi_panel = { 424 + static struct tfp410_platform_data omap4_dvi_panel = { 425 425 .i2c_bus_num = 3, 426 426 .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 427 427 }; ··· 429 429 struct omap_dss_device omap4_panda_dvi_device = { 430 430 .type = OMAP_DISPLAY_TYPE_DPI, 431 431 .name = "dvi", 432 - .driver_name = "dvi", 432 + .driver_name = "tfp410", 433 433 .data = &omap4_dvi_panel, 434 434 .phy.dpi.data_lines = 24, 435 435 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
+2 -2
arch/arm/mach-omap2/board-overo.c
··· 167 167 gpio_export(OVERO_GPIO_LCD_BL, 0); 168 168 } 169 169 170 - static struct panel_dvi_platform_data dvi_panel = { 170 + static struct tfp410_platform_data dvi_panel = { 171 171 .i2c_bus_num = 3, 172 172 .power_down_gpio = -1, 173 173 }; ··· 175 175 static struct omap_dss_device overo_dvi_device = { 176 176 .name = "dvi", 177 177 .type = OMAP_DISPLAY_TYPE_DPI, 178 - .driver_name = "dvi", 178 + .driver_name = "tfp410", 179 179 .data = &dvi_panel, 180 180 .phy.dpi.data_lines = 24, 181 181 };
+4 -4
drivers/video/omap2/displays/Kconfig
··· 10 10 Supports LCD Panel used in TI SDP3430 and EVM boards, 11 11 OMAP3517 EVM boards and CM-T35. 12 12 13 - config PANEL_DVI 14 - tristate "DVI output" 13 + config PANEL_TFP410 14 + tristate "TFP410 DPI-to-DVI chip" 15 15 depends on OMAP2_DSS_DPI && I2C 16 16 help 17 - Driver for external monitors, connected via DVI. The driver uses i2c 18 - to read EDID information from the monitor. 17 + Driver for TFP410 DPI-to-DVI chip. The driver uses i2c to read EDID 18 + information from the monitor. 19 19 20 20 config PANEL_LGPHILIPS_LB035Q02 21 21 tristate "LG.Philips LB035Q02 LCD Panel"
+1 -1
drivers/video/omap2/displays/Makefile
··· 1 1 obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o 2 - obj-$(CONFIG_PANEL_DVI) += panel-dvi.o 2 + obj-$(CONFIG_PANEL_TFP410) += panel-dvi.o 3 3 obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o 4 4 obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o 5 5 obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o
+47 -47
drivers/video/omap2/displays/panel-dvi.c
··· 1 1 /* 2 - * DVI output support 2 + * TFP410 DPI-to-DVI chip 3 3 * 4 4 * Copyright (C) 2011 Texas Instruments Inc 5 5 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> ··· 26 26 27 27 #include <video/omap-panel-dvi.h> 28 28 29 - static const struct omap_video_timings panel_dvi_default_timings = { 29 + static const struct omap_video_timings tfp410_default_timings = { 30 30 .x_res = 640, 31 31 .y_res = 480, 32 32 ··· 49 49 int pd_gpio; 50 50 }; 51 51 52 - static inline struct panel_dvi_platform_data 52 + static inline struct tfp410_platform_data 53 53 *get_pdata(const struct omap_dss_device *dssdev) 54 54 { 55 55 return dssdev->data; 56 56 } 57 57 58 - static int panel_dvi_power_on(struct omap_dss_device *dssdev) 58 + static int tfp410_power_on(struct omap_dss_device *dssdev) 59 59 { 60 60 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 61 61 int r; ··· 75 75 return r; 76 76 } 77 77 78 - static void panel_dvi_power_off(struct omap_dss_device *dssdev) 78 + static void tfp410_power_off(struct omap_dss_device *dssdev) 79 79 { 80 80 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 81 81 ··· 88 88 omapdss_dpi_display_disable(dssdev); 89 89 } 90 90 91 - static int panel_dvi_probe(struct omap_dss_device *dssdev) 91 + static 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 94 struct panel_drv_data *ddata; 95 95 int r; 96 96 ··· 98 98 if (!ddata) 99 99 return -ENOMEM; 100 100 101 - dssdev->panel.timings = panel_dvi_default_timings; 101 + dssdev->panel.timings = tfp410_default_timings; 102 102 dssdev->panel.config = OMAP_DSS_LCD_TFT; 103 103 104 104 ddata->dssdev = dssdev; ··· 124 124 return 0; 125 125 } 126 126 127 - static void __exit panel_dvi_remove(struct omap_dss_device *dssdev) 127 + static void __exit tfp410_remove(struct omap_dss_device *dssdev) 128 128 { 129 129 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 130 130 ··· 140 140 kfree(ddata); 141 141 } 142 142 143 - static int panel_dvi_enable(struct omap_dss_device *dssdev) 143 + static int tfp410_enable(struct omap_dss_device *dssdev) 144 144 { 145 145 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 146 146 int r; 147 147 148 148 mutex_lock(&ddata->lock); 149 149 150 - r = panel_dvi_power_on(dssdev); 150 + r = tfp410_power_on(dssdev); 151 151 if (r == 0) 152 152 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 153 153 ··· 156 156 return r; 157 157 } 158 158 159 - static void panel_dvi_disable(struct omap_dss_device *dssdev) 159 + static void tfp410_disable(struct omap_dss_device *dssdev) 160 160 { 161 161 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 162 162 163 163 mutex_lock(&ddata->lock); 164 164 165 - panel_dvi_power_off(dssdev); 165 + tfp410_power_off(dssdev); 166 166 167 167 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; 168 168 169 169 mutex_unlock(&ddata->lock); 170 170 } 171 171 172 - static int panel_dvi_suspend(struct omap_dss_device *dssdev) 172 + static int tfp410_suspend(struct omap_dss_device *dssdev) 173 173 { 174 174 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 175 175 176 176 mutex_lock(&ddata->lock); 177 177 178 - panel_dvi_power_off(dssdev); 178 + tfp410_power_off(dssdev); 179 179 180 180 dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; 181 181 ··· 184 184 return 0; 185 185 } 186 186 187 - static int panel_dvi_resume(struct omap_dss_device *dssdev) 187 + static int tfp410_resume(struct omap_dss_device *dssdev) 188 188 { 189 189 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 190 190 int r; 191 191 192 192 mutex_lock(&ddata->lock); 193 193 194 - r = panel_dvi_power_on(dssdev); 194 + r = tfp410_power_on(dssdev); 195 195 if (r == 0) 196 196 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 197 197 ··· 200 200 return r; 201 201 } 202 202 203 - static void panel_dvi_set_timings(struct omap_dss_device *dssdev, 203 + static void tfp410_set_timings(struct omap_dss_device *dssdev, 204 204 struct omap_video_timings *timings) 205 205 { 206 206 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); ··· 210 210 mutex_unlock(&ddata->lock); 211 211 } 212 212 213 - static void panel_dvi_get_timings(struct omap_dss_device *dssdev, 213 + static void tfp410_get_timings(struct omap_dss_device *dssdev, 214 214 struct omap_video_timings *timings) 215 215 { 216 216 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); ··· 220 220 mutex_unlock(&ddata->lock); 221 221 } 222 222 223 - static int panel_dvi_check_timings(struct omap_dss_device *dssdev, 223 + static int tfp410_check_timings(struct omap_dss_device *dssdev, 224 224 struct omap_video_timings *timings) 225 225 { 226 226 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); ··· 234 234 } 235 235 236 236 237 - static int panel_dvi_ddc_read(struct i2c_adapter *adapter, 237 + static int tfp410_ddc_read(struct i2c_adapter *adapter, 238 238 unsigned char *buf, u16 count, u8 offset) 239 239 { 240 240 int r, retries; ··· 265 265 return r < 0 ? r : -EIO; 266 266 } 267 267 268 - static int panel_dvi_read_edid(struct omap_dss_device *dssdev, 268 + static int tfp410_read_edid(struct omap_dss_device *dssdev, 269 269 u8 *edid, int len) 270 270 { 271 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 273 struct i2c_adapter *adapter; 274 274 int r, l, bytes_read; 275 275 ··· 289 289 } 290 290 291 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 293 if (r) 294 294 goto err; 295 295 ··· 299 299 if (len > EDID_LENGTH && edid[0x7e] > 0) { 300 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 303 l, EDID_LENGTH); 304 304 if (r) 305 305 goto err; ··· 316 316 return r; 317 317 } 318 318 319 - static bool panel_dvi_detect(struct omap_dss_device *dssdev) 319 + static bool tfp410_detect(struct omap_dss_device *dssdev) 320 320 { 321 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 323 struct i2c_adapter *adapter; 324 324 unsigned char out; 325 325 int r; ··· 333 333 if (!adapter) 334 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 338 mutex_unlock(&ddata->lock); 339 339 ··· 344 344 return true; 345 345 } 346 346 347 - static struct omap_dss_driver panel_dvi_driver = { 348 - .probe = panel_dvi_probe, 349 - .remove = __exit_p(panel_dvi_remove), 347 + static struct omap_dss_driver tfp410_driver = { 348 + .probe = tfp410_probe, 349 + .remove = __exit_p(tfp410_remove), 350 350 351 - .enable = panel_dvi_enable, 352 - .disable = panel_dvi_disable, 353 - .suspend = panel_dvi_suspend, 354 - .resume = panel_dvi_resume, 351 + .enable = tfp410_enable, 352 + .disable = tfp410_disable, 353 + .suspend = tfp410_suspend, 354 + .resume = tfp410_resume, 355 355 356 - .set_timings = panel_dvi_set_timings, 357 - .get_timings = panel_dvi_get_timings, 358 - .check_timings = panel_dvi_check_timings, 356 + .set_timings = tfp410_set_timings, 357 + .get_timings = tfp410_get_timings, 358 + .check_timings = tfp410_check_timings, 359 359 360 - .read_edid = panel_dvi_read_edid, 361 - .detect = panel_dvi_detect, 360 + .read_edid = tfp410_read_edid, 361 + .detect = tfp410_detect, 362 362 363 363 .driver = { 364 - .name = "dvi", 364 + .name = "tfp410", 365 365 .owner = THIS_MODULE, 366 366 }, 367 367 }; 368 368 369 - static int __init panel_dvi_init(void) 369 + static 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 374 - static void __exit panel_dvi_exit(void) 374 + static 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 379 - module_init(panel_dvi_init); 380 - module_exit(panel_dvi_exit); 379 + module_init(tfp410_init); 380 + module_exit(tfp410_exit); 381 381 MODULE_LICENSE("GPL");
+6 -6
include/video/omap-panel-dvi.h
··· 1 1 /* 2 - * Header for DVI output driver 2 + * Header for TFP410 chip driver 3 3 * 4 4 * Copyright (C) 2011 Texas Instruments Inc 5 5 * Author: Tomi Valkeinen <tomi.valkeinen@ti.com> ··· 17 17 * this program. If not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 19 20 - #ifndef __OMAP_PANEL_DVI_H 21 - #define __OMAP_PANEL_DVI_H 20 + #ifndef __OMAP_PANEL_TFP410_H 21 + #define __OMAP_PANEL_TFP410_H 22 22 23 23 struct omap_dss_device; 24 24 25 25 /** 26 - * struct panel_dvi_platform_data - panel driver configuration data 26 + * struct tfp410_platform_data - panel driver configuration data 27 27 * @i2c_bus_num: i2c bus id for the panel 28 28 * @power_down_gpio: gpio number for PD pin (or -1 if not available) 29 29 */ 30 - struct panel_dvi_platform_data { 30 + struct tfp410_platform_data { 31 31 u16 i2c_bus_num; 32 32 int power_down_gpio; 33 33 }; 34 34 35 - #endif /* __OMAP_PANEL_DVI_H */ 35 + #endif /* __OMAP_PANEL_TFP410_H */