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

Merge branch 'for-l-o-3.5'

Conflicts:
drivers/video/omap2/displays/panel-taal.c

Merge OMAP DSS related board file changes. The branch will also be
merged through linux-omap tree to solve conflicts.

+251 -448
+4 -34
arch/arm/mach-omap2/board-3430sdp.c
··· 37 37 #include <plat/dma.h> 38 38 #include <plat/gpmc.h> 39 39 #include <video/omapdss.h> 40 - #include <video/omap-panel-dvi.h> 40 + #include <video/omap-panel-tfp410.h> 41 41 42 42 #include <plat/gpmc-smc91x.h> 43 43 ··· 113 113 {SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"}, 114 114 }; 115 115 116 - static int lcd_enabled; 117 - static int dvi_enabled; 118 - 119 116 static void __init sdp3430_display_init(void) 120 117 { 121 118 int r; ··· 126 129 127 130 static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev) 128 131 { 129 - if (dvi_enabled) { 130 - printk(KERN_ERR "cannot enable LCD, DVI is enabled\n"); 131 - return -EINVAL; 132 - } 133 - 134 132 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1); 135 133 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1); 136 - 137 - lcd_enabled = 1; 138 134 139 135 return 0; 140 136 } 141 137 142 138 static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev) 143 139 { 144 - lcd_enabled = 0; 145 - 146 140 gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0); 147 141 gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0); 148 - } 149 - 150 - static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev) 151 - { 152 - if (lcd_enabled) { 153 - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); 154 - return -EINVAL; 155 - } 156 - 157 - dvi_enabled = 1; 158 - 159 - return 0; 160 - } 161 - 162 - static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev) 163 - { 164 - dvi_enabled = 0; 165 142 } 166 143 167 144 static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) ··· 157 186 .platform_disable = sdp3430_panel_disable_lcd, 158 187 }; 159 188 160 - static struct panel_dvi_platform_data dvi_panel = { 161 - .platform_enable = sdp3430_panel_enable_dvi, 162 - .platform_disable = sdp3430_panel_disable_dvi, 189 + static struct tfp410_platform_data dvi_panel = { 190 + .power_down_gpio = -1, 163 191 }; 164 192 165 193 static struct omap_dss_device sdp3430_dvi_device = { 166 194 .name = "dvi", 167 195 .type = OMAP_DISPLAY_TYPE_DPI, 168 - .driver_name = "dvi", 196 + .driver_name = "tfp410", 169 197 .data = &dvi_panel, 170 198 .phy.dpi.data_lines = 24, 171 199 };
+8 -29
arch/arm/mach-omap2/board-4430sdp.c
··· 666 666 .use_ext_te = false, 667 667 .ext_te_gpio = 101, 668 668 .esd_interval = 0, 669 + .pin_config = { 670 + .num_pins = 6, 671 + .pins = { 0, 1, 2, 3, 4, 5 }, 672 + }, 669 673 }; 670 674 671 675 static struct omap_dss_device sdp4430_lcd_device = { ··· 678 674 .type = OMAP_DISPLAY_TYPE_DSI, 679 675 .data = &dsi1_panel, 680 676 .phy.dsi = { 681 - .clk_lane = 1, 682 - .clk_pol = 0, 683 - .data1_lane = 2, 684 - .data1_pol = 0, 685 - .data2_lane = 3, 686 - .data2_pol = 0, 687 - 688 677 .module = 0, 689 678 }, 690 679 ··· 712 715 .use_ext_te = false, 713 716 .ext_te_gpio = 103, 714 717 .esd_interval = 0, 718 + .pin_config = { 719 + .num_pins = 6, 720 + .pins = { 0, 1, 2, 3, 4, 5 }, 721 + }, 715 722 }; 716 723 717 724 static struct omap_dss_device sdp4430_lcd2_device = { ··· 724 723 .type = OMAP_DISPLAY_TYPE_DSI, 725 724 .data = &dsi2_panel, 726 725 .phy.dsi = { 727 - .clk_lane = 1, 728 - .clk_pol = 0, 729 - .data1_lane = 2, 730 - .data1_pol = 0, 731 - .data2_lane = 3, 732 - .data2_pol = 0, 733 726 734 727 .module = 1, 735 728 }, ··· 752 757 }, 753 758 .channel = OMAP_DSS_CHANNEL_LCD2, 754 759 }; 755 - 756 - static void sdp4430_lcd_init(void) 757 - { 758 - int r; 759 - 760 - r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT, 761 - "lcd1_reset_gpio"); 762 - if (r) 763 - pr_err("%s: Could not get lcd1_reset_gpio\n", __func__); 764 - 765 - r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT, 766 - "lcd2_reset_gpio"); 767 - if (r) 768 - pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); 769 - } 770 760 771 761 static struct omap_dss_hdmi_data sdp4430_hdmi_data = { 772 762 .hpd_gpio = HDMI_GPIO_HPD, ··· 838 858 if (r) 839 859 pr_err("%s: Could not get display_sel GPIO\n", __func__); 840 860 841 - sdp4430_lcd_init(); 842 861 sdp4430_picodlp_init(); 843 862 omap_display_init(&sdp4430_dss_data); 844 863 /*
+4 -21
arch/arm/mach-omap2/board-am3517evm.c
··· 37 37 #include <plat/usb.h> 38 38 #include <video/omapdss.h> 39 39 #include <video/omap-panel-generic-dpi.h> 40 - #include <video/omap-panel-dvi.h> 40 + #include <video/omap-panel-tfp410.h> 41 41 42 42 #include "am35xx-emac.h" 43 43 #include "mux.h" ··· 207 207 .platform_disable = am3517_evm_panel_disable_tv, 208 208 }; 209 209 210 - static int am3517_evm_panel_enable_dvi(struct omap_dss_device *dssdev) 211 - { 212 - if (lcd_enabled) { 213 - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); 214 - return -EINVAL; 215 - } 216 - dvi_enabled = 1; 217 - 218 - return 0; 219 - } 220 - 221 - static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev) 222 - { 223 - dvi_enabled = 0; 224 - } 225 - 226 - static struct panel_dvi_platform_data dvi_panel = { 227 - .platform_enable = am3517_evm_panel_enable_dvi, 228 - .platform_disable = am3517_evm_panel_disable_dvi, 210 + static struct tfp410_platform_data dvi_panel = { 211 + .power_down_gpio = -1, 229 212 }; 230 213 231 214 static struct omap_dss_device am3517_evm_dvi_device = { 232 215 .type = OMAP_DISPLAY_TYPE_DPI, 233 216 .name = "dvi", 234 - .driver_name = "dvi", 217 + .driver_name = "tfp410", 235 218 .data = &dvi_panel, 236 219 .phy.dpi.data_lines = 24, 237 220 };
+4 -26
arch/arm/mach-omap2/board-cm-t35.c
··· 44 44 #include <plat/usb.h> 45 45 #include <video/omapdss.h> 46 46 #include <video/omap-panel-generic-dpi.h> 47 - #include <video/omap-panel-dvi.h> 47 + #include <video/omap-panel-tfp410.h> 48 48 #include <plat/mcspi.h> 49 49 50 50 #include <mach/hardware.h> ··· 218 218 gpio_set_value(CM_T35_LCD_EN_GPIO, 0); 219 219 } 220 220 221 - static int cm_t35_panel_enable_dvi(struct omap_dss_device *dssdev) 222 - { 223 - if (lcd_enabled) { 224 - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); 225 - return -EINVAL; 226 - } 227 - 228 - gpio_set_value(CM_T35_DVI_EN_GPIO, 0); 229 - dvi_enabled = 1; 230 - 231 - return 0; 232 - } 233 - 234 - static void cm_t35_panel_disable_dvi(struct omap_dss_device *dssdev) 235 - { 236 - gpio_set_value(CM_T35_DVI_EN_GPIO, 1); 237 - dvi_enabled = 0; 238 - } 239 - 240 221 static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev) 241 222 { 242 223 return 0; ··· 241 260 .phy.dpi.data_lines = 18, 242 261 }; 243 262 244 - static struct panel_dvi_platform_data dvi_panel = { 245 - .platform_enable = cm_t35_panel_enable_dvi, 246 - .platform_disable = cm_t35_panel_disable_dvi, 263 + static struct tfp410_platform_data dvi_panel = { 264 + .power_down_gpio = CM_T35_DVI_EN_GPIO, 247 265 }; 248 266 249 267 static struct omap_dss_device cm_t35_dvi_device = { 250 268 .name = "dvi", 251 269 .type = OMAP_DISPLAY_TYPE_DPI, 252 - .driver_name = "dvi", 270 + .driver_name = "tfp410", 253 271 .data = &dvi_panel, 254 272 .phy.dpi.data_lines = 24, 255 273 }; ··· 296 316 static struct gpio cm_t35_dss_gpios[] __initdata = { 297 317 { CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" }, 298 318 { CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" }, 299 - { CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" }, 300 319 }; 301 320 302 321 static void __init cm_t35_init_display(void) ··· 314 335 315 336 gpio_export(CM_T35_LCD_EN_GPIO, 0); 316 337 gpio_export(CM_T35_LCD_BL_GPIO, 0); 317 - gpio_export(CM_T35_DVI_EN_GPIO, 0); 318 338 319 339 msleep(50); 320 340 gpio_set_value(CM_T35_LCD_EN_GPIO, 1);
+5 -25
arch/arm/mach-omap2/board-devkit8000.c
··· 47 47 #include <plat/usb.h> 48 48 #include <video/omapdss.h> 49 49 #include <video/omap-panel-generic-dpi.h> 50 - #include <video/omap-panel-dvi.h> 50 + #include <video/omap-panel-tfp410.h> 51 51 52 52 #include <plat/mcspi.h> 53 53 #include <linux/input/matrix_keypad.h> ··· 118 118 gpio_set_value_cansleep(dssdev->reset_gpio, 0); 119 119 } 120 120 121 - static int devkit8000_panel_enable_dvi(struct omap_dss_device *dssdev) 122 - { 123 - if (gpio_is_valid(dssdev->reset_gpio)) 124 - gpio_set_value_cansleep(dssdev->reset_gpio, 1); 125 - return 0; 126 - } 127 - 128 - static void devkit8000_panel_disable_dvi(struct omap_dss_device *dssdev) 129 - { 130 - if (gpio_is_valid(dssdev->reset_gpio)) 131 - gpio_set_value_cansleep(dssdev->reset_gpio, 0); 132 - } 133 - 134 121 static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = { 135 122 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), 136 123 }; ··· 141 154 .phy.dpi.data_lines = 24, 142 155 }; 143 156 144 - static struct panel_dvi_platform_data dvi_panel = { 145 - .platform_enable = devkit8000_panel_enable_dvi, 146 - .platform_disable = devkit8000_panel_disable_dvi, 157 + static struct tfp410_platform_data dvi_panel = { 158 + .power_down_gpio = -1, 147 159 }; 148 160 149 161 static struct omap_dss_device devkit8000_dvi_device = { 150 162 .name = "dvi", 151 163 .type = OMAP_DISPLAY_TYPE_DPI, 152 - .driver_name = "dvi", 164 + .driver_name = "tfp410", 153 165 .data = &dvi_panel, 154 166 .phy.dpi.data_lines = 24, 155 167 }; ··· 230 244 } 231 245 232 246 /* gpio + 7 is "DVI_PD" (out, active low) */ 233 - devkit8000_dvi_device.reset_gpio = gpio + 7; 234 - ret = gpio_request_one(devkit8000_dvi_device.reset_gpio, 235 - GPIOF_OUT_INIT_LOW, "DVI PowerDown"); 236 - if (ret < 0) { 237 - devkit8000_dvi_device.reset_gpio = -EINVAL; 238 - printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n"); 239 - } 247 + dvi_panel.power_down_gpio = gpio + 7; 240 248 241 249 return 0; 242 250 }
+5 -27
arch/arm/mach-omap2/board-igep0020.c
··· 32 32 #include <plat/gpmc.h> 33 33 #include <plat/usb.h> 34 34 #include <video/omapdss.h> 35 - #include <video/omap-panel-dvi.h> 35 + #include <video/omap-panel-tfp410.h> 36 36 #include <plat/onenand.h> 37 37 38 38 #include "mux.h" ··· 444 444 .setup = igep_twl_gpio_setup, 445 445 }; 446 446 447 - static int igep2_enable_dvi(struct omap_dss_device *dssdev) 448 - { 449 - gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1); 450 - 451 - return 0; 452 - } 453 - 454 - static void igep2_disable_dvi(struct omap_dss_device *dssdev) 455 - { 456 - gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0); 457 - } 458 - 459 - static struct panel_dvi_platform_data dvi_panel = { 460 - .platform_enable = igep2_enable_dvi, 461 - .platform_disable = igep2_disable_dvi, 462 - .i2c_bus_num = 3, 447 + static struct tfp410_platform_data dvi_panel = { 448 + .i2c_bus_num = 3, 449 + .power_down_gpio = IGEP2_GPIO_DVI_PUP, 463 450 }; 464 451 465 452 static struct omap_dss_device igep2_dvi_device = { 466 453 .type = OMAP_DISPLAY_TYPE_DPI, 467 454 .name = "dvi", 468 - .driver_name = "dvi", 455 + .driver_name = "tfp410", 469 456 .data = &dvi_panel, 470 457 .phy.dpi.data_lines = 24, 471 458 }; ··· 466 479 .devices = igep2_dss_devices, 467 480 .default_device = &igep2_dvi_device, 468 481 }; 469 - 470 - static void __init igep2_display_init(void) 471 - { 472 - int err = gpio_request_one(IGEP2_GPIO_DVI_PUP, GPIOF_OUT_INIT_HIGH, 473 - "GPIO_DVI_PUP"); 474 - if (err) 475 - pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n"); 476 - } 477 482 478 483 static struct platform_device *igep_devices[] __initdata = { 479 484 &igep_vwlan_device, ··· 647 668 648 669 if (machine_is_igep0020()) { 649 670 omap_display_init(&igep2_dss_data); 650 - igep2_display_init(); 651 671 igep2_init_smsc911x(); 652 672 usbhs_init(&igep2_usbhs_bdata); 653 673 } else {
+5 -32
arch/arm/mach-omap2/board-omap3beagle.c
··· 42 42 #include <plat/board.h> 43 43 #include "common.h" 44 44 #include <video/omapdss.h> 45 - #include <video/omap-panel-dvi.h> 45 + #include <video/omap-panel-tfp410.h> 46 46 #include <plat/gpmc.h> 47 47 #include <plat/nand.h> 48 48 #include <plat/usb.h> ··· 189 189 190 190 /* DSS */ 191 191 192 - static int beagle_enable_dvi(struct omap_dss_device *dssdev) 193 - { 194 - if (gpio_is_valid(dssdev->reset_gpio)) 195 - gpio_set_value(dssdev->reset_gpio, 1); 196 - 197 - return 0; 198 - } 199 - 200 - static void beagle_disable_dvi(struct omap_dss_device *dssdev) 201 - { 202 - if (gpio_is_valid(dssdev->reset_gpio)) 203 - gpio_set_value(dssdev->reset_gpio, 0); 204 - } 205 - 206 - static struct panel_dvi_platform_data dvi_panel = { 207 - .platform_enable = beagle_enable_dvi, 208 - .platform_disable = beagle_disable_dvi, 192 + static struct tfp410_platform_data dvi_panel = { 209 193 .i2c_bus_num = 3, 194 + .power_down_gpio = -1, 210 195 }; 211 196 212 197 static struct omap_dss_device beagle_dvi_device = { 213 198 .type = OMAP_DISPLAY_TYPE_DPI, 214 199 .name = "dvi", 215 - .driver_name = "dvi", 200 + .driver_name = "tfp410", 216 201 .data = &dvi_panel, 217 202 .phy.dpi.data_lines = 24, 218 - .reset_gpio = -EINVAL, 219 203 }; 220 204 221 205 static struct omap_dss_device beagle_tv_device = { ··· 219 235 .devices = beagle_dss_devices, 220 236 .default_device = &beagle_dvi_device, 221 237 }; 222 - 223 - static void __init beagle_display_init(void) 224 - { 225 - int r; 226 - 227 - r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW, 228 - "DVI reset"); 229 - if (r < 0) 230 - printk(KERN_ERR "Unable to get DVI reset GPIO\n"); 231 - } 232 238 233 239 #include "sdram-micron-mt46h32m32lf-6.h" 234 240 ··· 283 309 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) 284 310 pr_err("%s: unable to configure EHCI_nOC\n", __func__); 285 311 } 286 - beagle_dvi_device.reset_gpio = beagle_config.reset_gpio; 312 + dvi_panel.power_down_gpio = beagle_config.reset_gpio; 287 313 288 314 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, 289 315 "nEN_USB_PWR"); ··· 526 552 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 527 553 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 528 554 529 - beagle_display_init(); 530 555 beagle_opp_init(); 531 556 } 532 557
+4 -25
arch/arm/mach-omap2/board-omap3evm.c
··· 46 46 #include "common.h" 47 47 #include <plat/mcspi.h> 48 48 #include <video/omapdss.h> 49 - #include <video/omap-panel-dvi.h> 49 + #include <video/omap-panel-tfp410.h> 50 50 51 51 #include "mux.h" 52 52 #include "sdram-micron-mt46h32m32lf-6.h" ··· 219 219 .platform_disable = omap3_evm_disable_tv, 220 220 }; 221 221 222 - static int omap3_evm_enable_dvi(struct omap_dss_device *dssdev) 223 - { 224 - if (lcd_enabled) { 225 - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); 226 - return -EINVAL; 227 - } 228 - 229 - gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 1); 230 - 231 - dvi_enabled = 1; 232 - return 0; 233 - } 234 - 235 - static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev) 236 - { 237 - gpio_set_value_cansleep(OMAP3EVM_DVI_PANEL_EN_GPIO, 0); 238 - 239 - dvi_enabled = 0; 240 - } 241 - 242 - static struct panel_dvi_platform_data dvi_panel = { 243 - .platform_enable = omap3_evm_enable_dvi, 244 - .platform_disable = omap3_evm_disable_dvi, 222 + static struct tfp410_platform_data dvi_panel = { 223 + .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, 245 224 }; 246 225 247 226 static struct omap_dss_device omap3_evm_dvi_device = { 248 227 .name = "dvi", 249 228 .type = OMAP_DISPLAY_TYPE_DPI, 250 - .driver_name = "dvi", 229 + .driver_name = "tfp410", 251 230 .data = &dvi_panel, 252 231 .phy.dpi.data_lines = 24, 253 232 };
+4 -25
arch/arm/mach-omap2/board-omap3stalker.c
··· 42 42 #include <plat/usb.h> 43 43 #include <video/omapdss.h> 44 44 #include <video/omap-panel-generic-dpi.h> 45 - #include <video/omap-panel-dvi.h> 45 + #include <video/omap-panel-tfp410.h> 46 46 47 47 #include <plat/mcspi.h> 48 48 #include <linux/input/matrix_keypad.h> ··· 92 92 #define LCD_PANEL_BKLIGHT_GPIO 210 93 93 #define ENABLE_VPLL2_DEV_GRP 0xE0 94 94 95 - static int lcd_enabled; 96 - static int dvi_enabled; 97 - 98 95 static void __init omap3_stalker_display_init(void) 99 96 { 100 97 return; ··· 119 122 .platform_disable = omap3_stalker_disable_tv, 120 123 }; 121 124 122 - static int omap3_stalker_enable_dvi(struct omap_dss_device *dssdev) 123 - { 124 - if (lcd_enabled) { 125 - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); 126 - return -EINVAL; 127 - } 128 - gpio_set_value(DSS_ENABLE_GPIO, 1); 129 - dvi_enabled = 1; 130 - return 0; 131 - } 132 - 133 - static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev) 134 - { 135 - gpio_set_value(DSS_ENABLE_GPIO, 0); 136 - dvi_enabled = 0; 137 - } 138 - 139 - static struct panel_dvi_platform_data dvi_panel = { 140 - .platform_enable = omap3_stalker_enable_dvi, 141 - .platform_disable = omap3_stalker_disable_dvi, 125 + static struct tfp410_platform_data dvi_panel = { 126 + .power_down_gpio = DSS_ENABLE_GPIO, 142 127 }; 143 128 144 129 static struct omap_dss_device omap3_stalker_dvi_device = { 145 130 .name = "dvi", 146 131 .type = OMAP_DISPLAY_TYPE_DPI, 147 - .driver_name = "dvi", 132 + .driver_name = "tfp410", 148 133 .data = &dvi_panel, 149 134 .phy.dpi.data_lines = 24, 150 135 };
+5 -34
arch/arm/mach-omap2/board-omap4panda.c
··· 42 42 #include "common.h" 43 43 #include <plat/usb.h> 44 44 #include <plat/mmc.h> 45 - #include <video/omap-panel-dvi.h> 45 + #include <video/omap-panel-tfp410.h> 46 46 47 47 #include "hsmmc.h" 48 48 #include "control.h" ··· 420 420 /* Display DVI */ 421 421 #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 422 422 423 - static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev) 424 - { 425 - gpio_set_value(dssdev->reset_gpio, 1); 426 - return 0; 427 - } 428 - 429 - static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev) 430 - { 431 - gpio_set_value(dssdev->reset_gpio, 0); 432 - } 433 - 434 423 /* Using generic display panel */ 435 - static struct panel_dvi_platform_data omap4_dvi_panel = { 436 - .platform_enable = omap4_panda_enable_dvi, 437 - .platform_disable = omap4_panda_disable_dvi, 438 - .i2c_bus_num = 3, 424 + static struct tfp410_platform_data omap4_dvi_panel = { 425 + .i2c_bus_num = 3, 426 + .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 439 427 }; 440 428 441 429 struct omap_dss_device omap4_panda_dvi_device = { 442 430 .type = OMAP_DISPLAY_TYPE_DPI, 443 431 .name = "dvi", 444 - .driver_name = "dvi", 432 + .driver_name = "tfp410", 445 433 .data = &omap4_dvi_panel, 446 434 .phy.dpi.data_lines = 24, 447 435 .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, 448 436 .channel = OMAP_DSS_CHANNEL_LCD2, 449 437 }; 450 438 451 - int __init omap4_panda_dvi_init(void) 452 - { 453 - int r; 454 - 455 - /* Requesting TFP410 DVI GPIO and disabling it, at bootup */ 456 - r = gpio_request_one(omap4_panda_dvi_device.reset_gpio, 457 - GPIOF_OUT_INIT_LOW, "DVI PD"); 458 - if (r) 459 - pr_err("Failed to get DVI powerdown GPIO\n"); 460 - 461 - return r; 462 - } 463 439 464 440 static struct gpio panda_hdmi_gpios[] = { 465 441 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" }, ··· 487 511 488 512 void __init omap4_panda_display_init(void) 489 513 { 490 - int r; 491 - 492 - r = omap4_panda_dvi_init(); 493 - if (r) 494 - pr_err("error initializing panda DVI\n"); 495 514 496 515 omap_display_init(&omap4_panda_dss_data); 497 516
+4 -21
arch/arm/mach-omap2/board-overo.c
··· 46 46 #include "common.h" 47 47 #include <video/omapdss.h> 48 48 #include <video/omap-panel-generic-dpi.h> 49 - #include <video/omap-panel-dvi.h> 49 + #include <video/omap-panel-tfp410.h> 50 50 #include <plat/gpmc.h> 51 51 #include <mach/hardware.h> 52 52 #include <plat/nand.h> ··· 167 167 gpio_export(OVERO_GPIO_LCD_BL, 0); 168 168 } 169 169 170 - static int overo_panel_enable_dvi(struct omap_dss_device *dssdev) 171 - { 172 - if (lcd_enabled) { 173 - printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); 174 - return -EINVAL; 175 - } 176 - dvi_enabled = 1; 177 - 178 - return 0; 179 - } 180 - 181 - static void overo_panel_disable_dvi(struct omap_dss_device *dssdev) 182 - { 183 - dvi_enabled = 0; 184 - } 185 - 186 - static struct panel_dvi_platform_data dvi_panel = { 187 - .platform_enable = overo_panel_enable_dvi, 188 - .platform_disable = overo_panel_disable_dvi, 170 + static struct tfp410_platform_data dvi_panel = { 189 171 .i2c_bus_num = 3, 172 + .power_down_gpio = -1, 190 173 }; 191 174 192 175 static struct omap_dss_device overo_dvi_device = { 193 176 .name = "dvi", 194 177 .type = OMAP_DISPLAY_TYPE_DPI, 195 - .driver_name = "dvi", 178 + .driver_name = "tfp410", 196 179 .data = &dvi_panel, 197 180 .phy.dpi.data_lines = 24, 198 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-tfp410.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
+76 -58
drivers/video/omap2/displays/panel-dvi.c drivers/video/omap2/displays/panel-tfp410.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> ··· 21 21 #include <linux/slab.h> 22 22 #include <video/omapdss.h> 23 23 #include <linux/i2c.h> 24 + #include <linux/gpio.h> 24 25 #include <drm/drm_edid.h> 25 26 26 - #include <video/omap-panel-dvi.h> 27 + #include <video/omap-panel-tfp410.h> 27 28 28 - static const struct omap_video_timings panel_dvi_default_timings = { 29 + static const struct omap_video_timings tfp410_default_timings = { 29 30 .x_res = 640, 30 31 .y_res = 480, 31 32 ··· 45 44 struct omap_dss_device *dssdev; 46 45 47 46 struct mutex lock; 47 + 48 + int pd_gpio; 48 49 }; 49 50 50 - static inline struct panel_dvi_platform_data 51 + static inline struct tfp410_platform_data 51 52 *get_pdata(const struct omap_dss_device *dssdev) 52 53 { 53 54 return dssdev->data; 54 55 } 55 56 56 - static int panel_dvi_power_on(struct omap_dss_device *dssdev) 57 + static int tfp410_power_on(struct omap_dss_device *dssdev) 57 58 { 58 - struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 59 + struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 59 60 int r; 60 61 61 62 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) ··· 67 64 if (r) 68 65 goto err0; 69 66 70 - if (pdata->platform_enable) { 71 - r = pdata->platform_enable(dssdev); 72 - if (r) 73 - goto err1; 74 - } 67 + if (gpio_is_valid(ddata->pd_gpio)) 68 + gpio_set_value(ddata->pd_gpio, 1); 75 69 76 70 return 0; 77 - err1: 78 - omapdss_dpi_display_disable(dssdev); 79 71 err0: 80 72 return r; 81 73 } 82 74 83 - static void panel_dvi_power_off(struct omap_dss_device *dssdev) 75 + static void tfp410_power_off(struct omap_dss_device *dssdev) 84 76 { 85 - struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 77 + struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 86 78 87 79 if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE) 88 80 return; 89 81 90 - if (pdata->platform_disable) 91 - pdata->platform_disable(dssdev); 82 + if (gpio_is_valid(ddata->pd_gpio)) 83 + gpio_set_value(ddata->pd_gpio, 0); 92 84 93 85 omapdss_dpi_display_disable(dssdev); 94 86 } 95 87 96 - static int panel_dvi_probe(struct omap_dss_device *dssdev) 88 + static int tfp410_probe(struct omap_dss_device *dssdev) 97 89 { 90 + struct tfp410_platform_data *pdata = get_pdata(dssdev); 98 91 struct panel_drv_data *ddata; 92 + int r; 99 93 100 94 ddata = kzalloc(sizeof(*ddata), GFP_KERNEL); 101 95 if (!ddata) 102 96 return -ENOMEM; 103 97 104 - dssdev->panel.timings = panel_dvi_default_timings; 98 + dssdev->panel.timings = tfp410_default_timings; 105 99 dssdev->panel.config = OMAP_DSS_LCD_TFT; 106 100 107 101 ddata->dssdev = dssdev; 108 102 mutex_init(&ddata->lock); 103 + 104 + if (pdata) 105 + ddata->pd_gpio = pdata->power_down_gpio; 106 + else 107 + ddata->pd_gpio = -1; 108 + 109 + if (gpio_is_valid(ddata->pd_gpio)) { 110 + r = gpio_request_one(ddata->pd_gpio, GPIOF_OUT_INIT_LOW, 111 + "tfp410 pd"); 112 + if (r) { 113 + dev_err(&dssdev->dev, "Failed to request PD GPIO %d\n", 114 + ddata->pd_gpio); 115 + ddata->pd_gpio = -1; 116 + } 117 + } 109 118 110 119 dev_set_drvdata(&dssdev->dev, ddata); 111 120 112 121 return 0; 113 122 } 114 123 115 - static void __exit panel_dvi_remove(struct omap_dss_device *dssdev) 124 + static void __exit tfp410_remove(struct omap_dss_device *dssdev) 116 125 { 117 126 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 118 127 119 128 mutex_lock(&ddata->lock); 129 + 130 + if (gpio_is_valid(ddata->pd_gpio)) 131 + gpio_free(ddata->pd_gpio); 120 132 121 133 dev_set_drvdata(&dssdev->dev, NULL); 122 134 ··· 140 122 kfree(ddata); 141 123 } 142 124 143 - static int panel_dvi_enable(struct omap_dss_device *dssdev) 125 + static int tfp410_enable(struct omap_dss_device *dssdev) 144 126 { 145 127 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 146 128 int r; 147 129 148 130 mutex_lock(&ddata->lock); 149 131 150 - r = panel_dvi_power_on(dssdev); 132 + r = tfp410_power_on(dssdev); 151 133 if (r == 0) 152 134 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 153 135 ··· 156 138 return r; 157 139 } 158 140 159 - static void panel_dvi_disable(struct omap_dss_device *dssdev) 141 + static void tfp410_disable(struct omap_dss_device *dssdev) 160 142 { 161 143 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 162 144 163 145 mutex_lock(&ddata->lock); 164 146 165 - panel_dvi_power_off(dssdev); 147 + tfp410_power_off(dssdev); 166 148 167 149 dssdev->state = OMAP_DSS_DISPLAY_DISABLED; 168 150 169 151 mutex_unlock(&ddata->lock); 170 152 } 171 153 172 - static int panel_dvi_suspend(struct omap_dss_device *dssdev) 154 + static int tfp410_suspend(struct omap_dss_device *dssdev) 173 155 { 174 156 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 175 157 176 158 mutex_lock(&ddata->lock); 177 159 178 - panel_dvi_power_off(dssdev); 160 + tfp410_power_off(dssdev); 179 161 180 162 dssdev->state = OMAP_DSS_DISPLAY_SUSPENDED; 181 163 ··· 184 166 return 0; 185 167 } 186 168 187 - static int panel_dvi_resume(struct omap_dss_device *dssdev) 169 + static int tfp410_resume(struct omap_dss_device *dssdev) 188 170 { 189 171 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 190 172 int r; 191 173 192 174 mutex_lock(&ddata->lock); 193 175 194 - r = panel_dvi_power_on(dssdev); 176 + r = tfp410_power_on(dssdev); 195 177 if (r == 0) 196 178 dssdev->state = OMAP_DSS_DISPLAY_ACTIVE; 197 179 ··· 200 182 return r; 201 183 } 202 184 203 - static void panel_dvi_set_timings(struct omap_dss_device *dssdev, 185 + static void tfp410_set_timings(struct omap_dss_device *dssdev, 204 186 struct omap_video_timings *timings) 205 187 { 206 188 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); ··· 210 192 mutex_unlock(&ddata->lock); 211 193 } 212 194 213 - static void panel_dvi_get_timings(struct omap_dss_device *dssdev, 195 + static void tfp410_get_timings(struct omap_dss_device *dssdev, 214 196 struct omap_video_timings *timings) 215 197 { 216 198 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); ··· 220 202 mutex_unlock(&ddata->lock); 221 203 } 222 204 223 - static int panel_dvi_check_timings(struct omap_dss_device *dssdev, 205 + static int tfp410_check_timings(struct omap_dss_device *dssdev, 224 206 struct omap_video_timings *timings) 225 207 { 226 208 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); ··· 234 216 } 235 217 236 218 237 - static int panel_dvi_ddc_read(struct i2c_adapter *adapter, 219 + static int tfp410_ddc_read(struct i2c_adapter *adapter, 238 220 unsigned char *buf, u16 count, u8 offset) 239 221 { 240 222 int r, retries; ··· 265 247 return r < 0 ? r : -EIO; 266 248 } 267 249 268 - static int panel_dvi_read_edid(struct omap_dss_device *dssdev, 250 + static int tfp410_read_edid(struct omap_dss_device *dssdev, 269 251 u8 *edid, int len) 270 252 { 271 253 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 272 - struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 254 + struct tfp410_platform_data *pdata = get_pdata(dssdev); 273 255 struct i2c_adapter *adapter; 274 256 int r, l, bytes_read; 275 257 ··· 289 271 } 290 272 291 273 l = min(EDID_LENGTH, len); 292 - r = panel_dvi_ddc_read(adapter, edid, l, 0); 274 + r = tfp410_ddc_read(adapter, edid, l, 0); 293 275 if (r) 294 276 goto err; 295 277 ··· 299 281 if (len > EDID_LENGTH && edid[0x7e] > 0) { 300 282 l = min(EDID_LENGTH, len - EDID_LENGTH); 301 283 302 - r = panel_dvi_ddc_read(adapter, edid + EDID_LENGTH, 284 + r = tfp410_ddc_read(adapter, edid + EDID_LENGTH, 303 285 l, EDID_LENGTH); 304 286 if (r) 305 287 goto err; ··· 316 298 return r; 317 299 } 318 300 319 - static bool panel_dvi_detect(struct omap_dss_device *dssdev) 301 + static bool tfp410_detect(struct omap_dss_device *dssdev) 320 302 { 321 303 struct panel_drv_data *ddata = dev_get_drvdata(&dssdev->dev); 322 - struct panel_dvi_platform_data *pdata = get_pdata(dssdev); 304 + struct tfp410_platform_data *pdata = get_pdata(dssdev); 323 305 struct i2c_adapter *adapter; 324 306 unsigned char out; 325 307 int r; ··· 333 315 if (!adapter) 334 316 goto out; 335 317 336 - r = panel_dvi_ddc_read(adapter, &out, 1, 0); 318 + r = tfp410_ddc_read(adapter, &out, 1, 0); 337 319 338 320 mutex_unlock(&ddata->lock); 339 321 ··· 344 326 return true; 345 327 } 346 328 347 - static struct omap_dss_driver panel_dvi_driver = { 348 - .probe = panel_dvi_probe, 349 - .remove = __exit_p(panel_dvi_remove), 329 + static struct omap_dss_driver tfp410_driver = { 330 + .probe = tfp410_probe, 331 + .remove = __exit_p(tfp410_remove), 350 332 351 - .enable = panel_dvi_enable, 352 - .disable = panel_dvi_disable, 353 - .suspend = panel_dvi_suspend, 354 - .resume = panel_dvi_resume, 333 + .enable = tfp410_enable, 334 + .disable = tfp410_disable, 335 + .suspend = tfp410_suspend, 336 + .resume = tfp410_resume, 355 337 356 - .set_timings = panel_dvi_set_timings, 357 - .get_timings = panel_dvi_get_timings, 358 - .check_timings = panel_dvi_check_timings, 338 + .set_timings = tfp410_set_timings, 339 + .get_timings = tfp410_get_timings, 340 + .check_timings = tfp410_check_timings, 359 341 360 - .read_edid = panel_dvi_read_edid, 361 - .detect = panel_dvi_detect, 342 + .read_edid = tfp410_read_edid, 343 + .detect = tfp410_detect, 362 344 363 345 .driver = { 364 - .name = "dvi", 346 + .name = "tfp410", 365 347 .owner = THIS_MODULE, 366 348 }, 367 349 }; 368 350 369 - static int __init panel_dvi_init(void) 351 + static int __init tfp410_init(void) 370 352 { 371 - return omap_dss_register_driver(&panel_dvi_driver); 353 + return omap_dss_register_driver(&tfp410_driver); 372 354 } 373 355 374 - static void __exit panel_dvi_exit(void) 356 + static void __exit tfp410_exit(void) 375 357 { 376 - omap_dss_unregister_driver(&panel_dvi_driver); 358 + omap_dss_unregister_driver(&tfp410_driver); 377 359 } 378 360 379 - module_init(panel_dvi_init); 380 - module_exit(panel_dvi_exit); 361 + module_init(tfp410_init); 362 + module_exit(tfp410_exit); 381 363 MODULE_LICENSE("GPL");
+22
drivers/video/omap2/displays/panel-taal.c
··· 912 912 913 913 dev_set_drvdata(&dssdev->dev, td); 914 914 915 + if (gpio_is_valid(panel_data->reset_gpio)) { 916 + r = gpio_request_one(panel_data->reset_gpio, GPIOF_OUT_INIT_LOW, 917 + "taal rst"); 918 + if (r) { 919 + dev_err(&dssdev->dev, "failed to request reset gpio\n"); 920 + goto err_rst_gpio; 921 + } 922 + } 923 + 915 924 taal_hw_reset(dssdev); 916 925 917 926 if (panel_data->use_dsi_backlight) { ··· 1001 992 if (bldev != NULL) 1002 993 backlight_device_unregister(bldev); 1003 994 err_bl: 995 + if (gpio_is_valid(panel_data->reset_gpio)) 996 + gpio_free(panel_data->reset_gpio); 997 + err_rst_gpio: 1004 998 destroy_workqueue(td->workqueue); 1005 999 err_wq: 1006 1000 kfree(td); ··· 1042 1030 /* reset, to be sure that the panel is in a valid state */ 1043 1031 taal_hw_reset(dssdev); 1044 1032 1033 + if (gpio_is_valid(panel_data->reset_gpio)) 1034 + gpio_free(panel_data->reset_gpio); 1035 + 1045 1036 kfree(td); 1046 1037 } 1047 1038 1048 1039 static int taal_power_on(struct omap_dss_device *dssdev) 1049 1040 { 1050 1041 struct taal_data *td = dev_get_drvdata(&dssdev->dev); 1042 + struct nokia_dsi_panel_data *panel_data = get_panel_data(dssdev); 1051 1043 u8 id1, id2, id3; 1052 1044 int r; 1045 + 1046 + r = omapdss_dsi_configure_pins(dssdev, &panel_data->pin_config); 1047 + if (r) { 1048 + dev_err(&dssdev->dev, "failed to configure DSI pins\n"); 1049 + goto err0; 1050 + }; 1053 1051 1054 1052 r = omapdss_dsi_display_enable(dssdev); 1055 1053 if (r) {
+68 -65
drivers/video/omap2/dss/dsi.c
··· 2045 2045 } 2046 2046 } 2047 2047 2048 - static int dsi_parse_lane_config(struct omap_dss_device *dssdev) 2049 - { 2050 - struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 2051 - struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 2052 - u8 lanes[DSI_MAX_NR_LANES]; 2053 - u8 polarities[DSI_MAX_NR_LANES]; 2054 - int num_lanes, i; 2055 - 2056 - static const enum dsi_lane_function functions[] = { 2057 - DSI_LANE_CLK, 2058 - DSI_LANE_DATA1, 2059 - DSI_LANE_DATA2, 2060 - DSI_LANE_DATA3, 2061 - DSI_LANE_DATA4, 2062 - }; 2063 - 2064 - lanes[0] = dssdev->phy.dsi.clk_lane; 2065 - lanes[1] = dssdev->phy.dsi.data1_lane; 2066 - lanes[2] = dssdev->phy.dsi.data2_lane; 2067 - lanes[3] = dssdev->phy.dsi.data3_lane; 2068 - lanes[4] = dssdev->phy.dsi.data4_lane; 2069 - polarities[0] = dssdev->phy.dsi.clk_pol; 2070 - polarities[1] = dssdev->phy.dsi.data1_pol; 2071 - polarities[2] = dssdev->phy.dsi.data2_pol; 2072 - polarities[3] = dssdev->phy.dsi.data3_pol; 2073 - polarities[4] = dssdev->phy.dsi.data4_pol; 2074 - 2075 - num_lanes = 0; 2076 - 2077 - for (i = 0; i < dsi->num_lanes_supported; ++i) 2078 - dsi->lanes[i].function = DSI_LANE_UNUSED; 2079 - 2080 - for (i = 0; i < dsi->num_lanes_supported; ++i) { 2081 - int num; 2082 - 2083 - if (lanes[i] == DSI_LANE_UNUSED) 2084 - break; 2085 - 2086 - num = lanes[i] - 1; 2087 - 2088 - if (num >= dsi->num_lanes_supported) 2089 - return -EINVAL; 2090 - 2091 - if (dsi->lanes[num].function != DSI_LANE_UNUSED) 2092 - return -EINVAL; 2093 - 2094 - dsi->lanes[num].function = functions[i]; 2095 - dsi->lanes[num].polarity = polarities[i]; 2096 - num_lanes++; 2097 - } 2098 - 2099 - if (num_lanes < 2 || num_lanes > dsi->num_lanes_supported) 2100 - return -EINVAL; 2101 - 2102 - dsi->num_lanes_used = num_lanes; 2103 - 2104 - return 0; 2105 - } 2106 - 2107 2048 static int dsi_set_lane_config(struct omap_dss_device *dssdev) 2108 2049 { 2109 2050 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); ··· 3885 3944 } 3886 3945 } 3887 3946 3947 + int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, 3948 + const struct omap_dsi_pin_config *pin_cfg) 3949 + { 3950 + struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 3951 + struct dsi_data *dsi = dsi_get_dsidrv_data(dsidev); 3952 + int num_pins; 3953 + const int *pins; 3954 + struct dsi_lane_config lanes[DSI_MAX_NR_LANES]; 3955 + int num_lanes; 3956 + int i; 3957 + 3958 + static const enum dsi_lane_function functions[] = { 3959 + DSI_LANE_CLK, 3960 + DSI_LANE_DATA1, 3961 + DSI_LANE_DATA2, 3962 + DSI_LANE_DATA3, 3963 + DSI_LANE_DATA4, 3964 + }; 3965 + 3966 + num_pins = pin_cfg->num_pins; 3967 + pins = pin_cfg->pins; 3968 + 3969 + if (num_pins < 4 || num_pins > dsi->num_lanes_supported * 2 3970 + || num_pins % 2 != 0) 3971 + return -EINVAL; 3972 + 3973 + for (i = 0; i < DSI_MAX_NR_LANES; ++i) 3974 + lanes[i].function = DSI_LANE_UNUSED; 3975 + 3976 + num_lanes = 0; 3977 + 3978 + for (i = 0; i < num_pins; i += 2) { 3979 + u8 lane, pol; 3980 + int dx, dy; 3981 + 3982 + dx = pins[i]; 3983 + dy = pins[i + 1]; 3984 + 3985 + if (dx < 0 || dx >= dsi->num_lanes_supported * 2) 3986 + return -EINVAL; 3987 + 3988 + if (dy < 0 || dy >= dsi->num_lanes_supported * 2) 3989 + return -EINVAL; 3990 + 3991 + if (dx & 1) { 3992 + if (dy != dx - 1) 3993 + return -EINVAL; 3994 + pol = 1; 3995 + } else { 3996 + if (dy != dx + 1) 3997 + return -EINVAL; 3998 + pol = 0; 3999 + } 4000 + 4001 + lane = dx / 2; 4002 + 4003 + lanes[lane].function = functions[i / 2]; 4004 + lanes[lane].polarity = pol; 4005 + num_lanes++; 4006 + } 4007 + 4008 + memcpy(dsi->lanes, lanes, sizeof(dsi->lanes)); 4009 + dsi->num_lanes_used = num_lanes; 4010 + 4011 + return 0; 4012 + } 4013 + EXPORT_SYMBOL(omapdss_dsi_configure_pins); 4014 + 3888 4015 int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) 3889 4016 { 3890 4017 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); ··· 4309 4300 struct platform_device *dsidev = dsi_get_dsidev_from_dssdev(dssdev); 4310 4301 int dsi_module = dsi_get_dsidev_id(dsidev); 4311 4302 int r; 4312 - 4313 - r = dsi_parse_lane_config(dssdev); 4314 - if (r) { 4315 - DSSERR("illegal lane config"); 4316 - goto err0; 4317 - } 4318 4303 4319 4304 r = dsi_pll_init(dsidev, true, true); 4320 4305 if (r)
+8 -10
include/video/omap-panel-dvi.h include/video/omap-panel-tfp410.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 27 - * @platform_enable: platform specific panel enable function 28 - * @platform_disable: platform specific panel disable function 26 + * struct tfp410_platform_data - panel driver configuration data 29 27 * @i2c_bus_num: i2c bus id for the panel 28 + * @power_down_gpio: gpio number for PD pin (or -1 if not available) 30 29 */ 31 - struct panel_dvi_platform_data { 32 - int (*platform_enable)(struct omap_dss_device *dssdev); 33 - void (*platform_disable)(struct omap_dss_device *dssdev); 30 + struct tfp410_platform_data { 34 31 u16 i2c_bus_num; 32 + int power_down_gpio; 35 33 }; 36 34 37 - #endif /* __OMAP_PANEL_DVI_H */ 35 + #endif /* __OMAP_PANEL_TFP410_H */
+3
include/video/omap-panel-nokia-dsi.h
··· 11 11 * @esd_interval: interval of ESD checks, 0 = disabled (ms) 12 12 * @ulps_timeout: time to wait before entering ULPS, 0 = disabled (ms) 13 13 * @use_dsi_backlight: true if panel uses DSI command to control backlight 14 + * @pin_config: DSI pin configuration 14 15 */ 15 16 struct nokia_dsi_panel_data { 16 17 const char *name; ··· 25 24 unsigned ulps_timeout; 26 25 27 26 bool use_dsi_backlight; 27 + 28 + struct omap_dsi_pin_config pin_config; 28 29 }; 29 30 30 31 #endif /* __OMAP_NOKIA_DSI_PANEL_H */
+17 -11
include/video/omapdss.h
··· 469 469 int (*wait_for_vsync)(struct omap_overlay_manager *mgr); 470 470 }; 471 471 472 + /* 22 pins means 1 clk lane and 10 data lanes */ 473 + #define OMAP_DSS_MAX_DSI_PINS 22 474 + 475 + struct omap_dsi_pin_config { 476 + int num_pins; 477 + /* 478 + * pin numbers in the following order: 479 + * clk+, clk- 480 + * data1+, data1- 481 + * data2+, data2- 482 + * ... 483 + */ 484 + int pins[OMAP_DSS_MAX_DSI_PINS]; 485 + }; 486 + 472 487 struct omap_dss_device { 473 488 struct device dev; 474 489 ··· 506 491 } sdi; 507 492 508 493 struct { 509 - u8 clk_lane; 510 - u8 clk_pol; 511 - u8 data1_lane; 512 - u8 data1_pol; 513 - u8 data2_lane; 514 - u8 data2_pol; 515 - u8 data3_lane; 516 - u8 data3_pol; 517 - u8 data4_lane; 518 - u8 data4_pol; 519 - 520 494 int module; 521 495 522 496 bool ext_te; ··· 694 690 int omap_dsi_request_vc(struct omap_dss_device *dssdev, int *channel); 695 691 int omap_dsi_set_vc_id(struct omap_dss_device *dssdev, int channel, int vc_id); 696 692 void omap_dsi_release_vc(struct omap_dss_device *dssdev, int channel); 693 + int omapdss_dsi_configure_pins(struct omap_dss_device *dssdev, 694 + const struct omap_dsi_pin_config *pin_cfg); 697 695 698 696 int omapdss_dsi_display_enable(struct omap_dss_device *dssdev); 699 697 void omapdss_dsi_display_disable(struct omap_dss_device *dssdev,