Skip to content

Commit 9b71fb5

Browse files
committed
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.
2 parents 1dfafbc + e4a9e94 commit 9b71fb5

19 files changed

Lines changed: 251 additions & 448 deletions

‎arch/arm/mach-omap2/board-3430sdp.c‎

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <plat/dma.h>
3838
#include <plat/gpmc.h>
3939
#include <video/omapdss.h>
40-
#include <video/omap-panel-dvi.h>
40+
#include <video/omap-panel-tfp410.h>
4141

4242
#include <plat/gpmc-smc91x.h>
4343

@@ -113,9 +113,6 @@ static struct gpio sdp3430_dss_gpios[] __initdata = {
113113
{SDP3430_LCD_PANEL_BACKLIGHT_GPIO, GPIOF_OUT_INIT_LOW, "LCD Backlight"},
114114
};
115115

116-
static int lcd_enabled;
117-
static int dvi_enabled;
118-
119116
static void __init sdp3430_display_init(void)
120117
{
121118
int r;
@@ -129,44 +126,18 @@ static void __init sdp3430_display_init(void)
129126

130127
static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev)
131128
{
132-
if (dvi_enabled) {
133-
printk(KERN_ERR "cannot enable LCD, DVI is enabled\n");
134-
return -EINVAL;
135-
}
136-
137129
gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 1);
138130
gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 1);
139131

140-
lcd_enabled = 1;
141-
142132
return 0;
143133
}
144134

145135
static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev)
146136
{
147-
lcd_enabled = 0;
148-
149137
gpio_direction_output(SDP3430_LCD_PANEL_ENABLE_GPIO, 0);
150138
gpio_direction_output(SDP3430_LCD_PANEL_BACKLIGHT_GPIO, 0);
151139
}
152140

153-
static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev)
154-
{
155-
if (lcd_enabled) {
156-
printk(KERN_ERR "cannot enable DVI, LCD is enabled\n");
157-
return -EINVAL;
158-
}
159-
160-
dvi_enabled = 1;
161-
162-
return 0;
163-
}
164-
165-
static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev)
166-
{
167-
dvi_enabled = 0;
168-
}
169-
170141
static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev)
171142
{
172143
return 0;
@@ -186,15 +157,14 @@ static struct omap_dss_device sdp3430_lcd_device = {
186157
.platform_disable = sdp3430_panel_disable_lcd,
187158
};
188159

189-
static struct panel_dvi_platform_data dvi_panel = {
190-
.platform_enable = sdp3430_panel_enable_dvi,
191-
.platform_disable = sdp3430_panel_disable_dvi,
160+
static struct tfp410_platform_data dvi_panel = {
161+
.power_down_gpio = -1,
192162
};
193163

194164
static struct omap_dss_device sdp3430_dvi_device = {
195165
.name = "dvi",
196166
.type = OMAP_DISPLAY_TYPE_DPI,
197-
.driver_name = "dvi",
167+
.driver_name = "tfp410",
198168
.data = &dvi_panel,
199169
.phy.dpi.data_lines = 24,
200170
};

‎arch/arm/mach-omap2/board-4430sdp.c‎

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,10 @@ static struct nokia_dsi_panel_data dsi1_panel = {
666666
.use_ext_te = false,
667667
.ext_te_gpio = 101,
668668
.esd_interval = 0,
669+
.pin_config = {
670+
.num_pins = 6,
671+
.pins = { 0, 1, 2, 3, 4, 5 },
672+
},
669673
};
670674

671675
static struct omap_dss_device sdp4430_lcd_device = {
@@ -674,13 +678,6 @@ static struct omap_dss_device sdp4430_lcd_device = {
674678
.type = OMAP_DISPLAY_TYPE_DSI,
675679
.data = &dsi1_panel,
676680
.phy.dsi = {
677-
.clk_lane = 1,
678-
.clk_pol = 0,
679-
.data1_lane = 2,
680-
.data1_pol = 0,
681-
.data2_lane = 3,
682-
.data2_pol = 0,
683-
684681
.module = 0,
685682
},
686683

@@ -715,6 +712,10 @@ static struct nokia_dsi_panel_data dsi2_panel = {
715712
.use_ext_te = false,
716713
.ext_te_gpio = 103,
717714
.esd_interval = 0,
715+
.pin_config = {
716+
.num_pins = 6,
717+
.pins = { 0, 1, 2, 3, 4, 5 },
718+
},
718719
};
719720

720721
static struct omap_dss_device sdp4430_lcd2_device = {
@@ -723,12 +724,6 @@ static struct omap_dss_device sdp4430_lcd2_device = {
723724
.type = OMAP_DISPLAY_TYPE_DSI,
724725
.data = &dsi2_panel,
725726
.phy.dsi = {
726-
.clk_lane = 1,
727-
.clk_pol = 0,
728-
.data1_lane = 2,
729-
.data1_pol = 0,
730-
.data2_lane = 3,
731-
.data2_pol = 0,
732727

733728
.module = 1,
734729
},
@@ -758,21 +753,6 @@ static struct omap_dss_device sdp4430_lcd2_device = {
758753
.channel = OMAP_DSS_CHANNEL_LCD2,
759754
};
760755

761-
static void sdp4430_lcd_init(void)
762-
{
763-
int r;
764-
765-
r = gpio_request_one(dsi1_panel.reset_gpio, GPIOF_DIR_OUT,
766-
"lcd1_reset_gpio");
767-
if (r)
768-
pr_err("%s: Could not get lcd1_reset_gpio\n", __func__);
769-
770-
r = gpio_request_one(dsi2_panel.reset_gpio, GPIOF_DIR_OUT,
771-
"lcd2_reset_gpio");
772-
if (r)
773-
pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
774-
}
775-
776756
static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
777757
.hpd_gpio = HDMI_GPIO_HPD,
778758
};
@@ -858,7 +838,6 @@ static void __init omap_4430sdp_display_init(void)
858838
if (r)
859839
pr_err("%s: Could not get display_sel GPIO\n", __func__);
860840

861-
sdp4430_lcd_init();
862841
sdp4430_picodlp_init();
863842
omap_display_init(&sdp4430_dss_data);
864843
/*

‎arch/arm/mach-omap2/board-am3517evm.c‎

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include <plat/usb.h>
3838
#include <video/omapdss.h>
3939
#include <video/omap-panel-generic-dpi.h>
40-
#include <video/omap-panel-dvi.h>
40+
#include <video/omap-panel-tfp410.h>
4141

4242
#include "am35xx-emac.h"
4343
#include "mux.h"
@@ -207,31 +207,14 @@ static struct omap_dss_device am3517_evm_tv_device = {
207207
.platform_disable = am3517_evm_panel_disable_tv,
208208
};
209209

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,
229212
};
230213

231214
static struct omap_dss_device am3517_evm_dvi_device = {
232215
.type = OMAP_DISPLAY_TYPE_DPI,
233216
.name = "dvi",
234-
.driver_name = "dvi",
217+
.driver_name = "tfp410",
235218
.data = &dvi_panel,
236219
.phy.dpi.data_lines = 24,
237220
};

‎arch/arm/mach-omap2/board-cm-t35.c‎

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
#include <plat/usb.h>
4545
#include <video/omapdss.h>
4646
#include <video/omap-panel-generic-dpi.h>
47-
#include <video/omap-panel-dvi.h>
47+
#include <video/omap-panel-tfp410.h>
4848
#include <plat/mcspi.h>
4949

5050
#include <mach/hardware.h>
@@ -218,25 +218,6 @@ static void cm_t35_panel_disable_lcd(struct omap_dss_device *dssdev)
218218
gpio_set_value(CM_T35_LCD_EN_GPIO, 0);
219219
}
220220

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-
240221
static int cm_t35_panel_enable_tv(struct omap_dss_device *dssdev)
241222
{
242223
return 0;
@@ -260,15 +241,14 @@ static struct omap_dss_device cm_t35_lcd_device = {
260241
.phy.dpi.data_lines = 18,
261242
};
262243

263-
static struct panel_dvi_platform_data dvi_panel = {
264-
.platform_enable = cm_t35_panel_enable_dvi,
265-
.platform_disable = cm_t35_panel_disable_dvi,
244+
static struct tfp410_platform_data dvi_panel = {
245+
.power_down_gpio = CM_T35_DVI_EN_GPIO,
266246
};
267247

268248
static struct omap_dss_device cm_t35_dvi_device = {
269249
.name = "dvi",
270250
.type = OMAP_DISPLAY_TYPE_DPI,
271-
.driver_name = "dvi",
251+
.driver_name = "tfp410",
272252
.data = &dvi_panel,
273253
.phy.dpi.data_lines = 24,
274254
};
@@ -316,7 +296,6 @@ static struct spi_board_info cm_t35_lcd_spi_board_info[] __initdata = {
316296
static struct gpio cm_t35_dss_gpios[] __initdata = {
317297
{ CM_T35_LCD_EN_GPIO, GPIOF_OUT_INIT_LOW, "lcd enable" },
318298
{ CM_T35_LCD_BL_GPIO, GPIOF_OUT_INIT_LOW, "lcd bl enable" },
319-
{ CM_T35_DVI_EN_GPIO, GPIOF_OUT_INIT_HIGH, "dvi enable" },
320299
};
321300

322301
static void __init cm_t35_init_display(void)
@@ -335,7 +314,6 @@ static void __init cm_t35_init_display(void)
335314

336315
gpio_export(CM_T35_LCD_EN_GPIO, 0);
337316
gpio_export(CM_T35_LCD_BL_GPIO, 0);
338-
gpio_export(CM_T35_DVI_EN_GPIO, 0);
339317

340318
msleep(50);
341319
gpio_set_value(CM_T35_LCD_EN_GPIO, 1);

‎arch/arm/mach-omap2/board-devkit8000.c‎

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#include <plat/usb.h>
4848
#include <video/omapdss.h>
4949
#include <video/omap-panel-generic-dpi.h>
50-
#include <video/omap-panel-dvi.h>
50+
#include <video/omap-panel-tfp410.h>
5151

5252
#include <plat/mcspi.h>
5353
#include <linux/input/matrix_keypad.h>
@@ -118,19 +118,6 @@ static void devkit8000_panel_disable_lcd(struct omap_dss_device *dssdev)
118118
gpio_set_value_cansleep(dssdev->reset_gpio, 0);
119119
}
120120

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-
134121
static struct regulator_consumer_supply devkit8000_vmmc1_supply[] = {
135122
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
136123
};
@@ -154,15 +141,14 @@ static struct omap_dss_device devkit8000_lcd_device = {
154141
.phy.dpi.data_lines = 24,
155142
};
156143

157-
static struct panel_dvi_platform_data dvi_panel = {
158-
.platform_enable = devkit8000_panel_enable_dvi,
159-
.platform_disable = devkit8000_panel_disable_dvi,
144+
static struct tfp410_platform_data dvi_panel = {
145+
.power_down_gpio = -1,
160146
};
161147

162148
static struct omap_dss_device devkit8000_dvi_device = {
163149
.name = "dvi",
164150
.type = OMAP_DISPLAY_TYPE_DPI,
165-
.driver_name = "dvi",
151+
.driver_name = "tfp410",
166152
.data = &dvi_panel,
167153
.phy.dpi.data_lines = 24,
168154
};
@@ -244,13 +230,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
244230
}
245231

246232
/* gpio + 7 is "DVI_PD" (out, active low) */
247-
devkit8000_dvi_device.reset_gpio = gpio + 7;
248-
ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
249-
GPIOF_OUT_INIT_LOW, "DVI PowerDown");
250-
if (ret < 0) {
251-
devkit8000_dvi_device.reset_gpio = -EINVAL;
252-
printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
253-
}
233+
dvi_panel.power_down_gpio = gpio + 7;
254234

255235
return 0;
256236
}

0 commit comments

Comments
 (0)