Merge "msm_fb: display: Add support for MIPI NT35510 client on SKU5" into msm-3.0

This commit is contained in:
Linux Build Service Account
2012-05-15 21:33:22 -07:00
committed by QuIC Gerrit Code Review
3 changed files with 25 additions and 1 deletions
@@ -665,6 +665,14 @@ static int evb_backlight_control(int level)
return 0;
}
static int mipi_NT35510_rotate_panel(void)
{
int rotate = 0;
if (machine_is_msm8625_evt())
rotate = 1;
return rotate;
}
static struct msm_panel_common_pdata mipi_truly_pdata = {
.pmic_backlight = mipi_truly_set_bl,
@@ -680,6 +688,7 @@ static struct platform_device mipi_dsi_truly_panel_device = {
static struct msm_panel_common_pdata mipi_NT35510_pdata = {
.pmic_backlight = evb_backlight_control,
.rotate_panel = mipi_NT35510_rotate_panel,
};
static struct platform_device mipi_dsi_NT35510_panel_device = {
+1
View File
@@ -381,6 +381,7 @@ struct msm_panel_common_pdata {
spinlock_t bl_spinlock;
int (*backlight_level)(int level, int max, int min);
int (*pmic_backlight)(int level);
int (*rotate_panel)(void);
int (*panel_num)(void);
void (*panel_config_gpio)(int);
int (*vga_switch)(int select_vga);
+15 -1
View File
@@ -418,6 +418,7 @@ static char video26[6] = {
static char video27[2] = {
0x35, 0x00,
};
static char config_video_MADCTL[2] = {0x36, 0xC0};
static struct dsi_cmd_desc nt35510_video_display_on_cmds[] = {
{DTYPE_GEN_LWRITE, 1, 0, 0, 50, sizeof(video0), video0},
{DTYPE_GEN_LWRITE, 1, 0, 0, 50, sizeof(video1), video1},
@@ -453,11 +454,15 @@ static struct dsi_cmd_desc nt35510_video_display_on_cmds[] = {
display_on},
};
static struct dsi_cmd_desc nt35510_video_display_on_cmds_rotate[] = {
{DTYPE_DCS_WRITE1, 1, 0, 0, 150,
sizeof(config_video_MADCTL), config_video_MADCTL},
};
static int mipi_nt35510_lcd_on(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd;
struct mipi_panel_info *mipi;
static int rotate;
mfd = platform_get_drvdata(pdev);
if (!mfd)
return -ENODEV;
@@ -467,10 +472,19 @@ static int mipi_nt35510_lcd_on(struct platform_device *pdev)
mipi = &mfd->panel_info.mipi;
if (mipi_nt35510_pdata && mipi_nt35510_pdata->rotate_panel)
rotate = mipi_nt35510_pdata->rotate_panel();
if (mipi->mode == DSI_VIDEO_MODE) {
mipi_dsi_cmds_tx(mfd, &nt35510_tx_buf,
nt35510_video_display_on_cmds,
ARRAY_SIZE(nt35510_video_display_on_cmds));
if (rotate) {
mipi_dsi_cmds_tx(mfd, &nt35510_tx_buf,
nt35510_video_display_on_cmds_rotate,
ARRAY_SIZE(nt35510_video_display_on_cmds_rotate));
}
} else if (mipi->mode == DSI_CMD_MODE) {
mipi_dsi_cmds_tx(mfd, &nt35510_tx_buf,
nt35510_cmd_display_on_cmds,