diff options
author | Magnus Damm <damm@opensource.se> | 2010-11-17 01:44:54 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-11-19 03:02:58 -0500 |
commit | 6722a4016d7f5f107a82ad71a3ee1ccec105532f (patch) | |
tree | ffee60b93d78fe65a7293e8d6be66c2e91cc1b63 /drivers/video/sh_mipi_dsi.c | |
parent | deaba190188f1caa2317de4df6c9aaba501f9809 (diff) |
fbdev: sh_mipi_dsi: Allow LCDC board callbacks
Update the MIPI-DSI driver to make use of the
LCD panel callbacks in the LCDC platform data.
Without this patch MIPI panels cannot use board
specific LCDC callbacks to control power and/or
back light.
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/sh_mipi_dsi.c')
-rw-r--r-- | drivers/video/sh_mipi_dsi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c index 148ee27cf81a..b40dc423cbdf 100644 --- a/drivers/video/sh_mipi_dsi.c +++ b/drivers/video/sh_mipi_dsi.c | |||
@@ -50,6 +50,9 @@ struct sh_mipi { | |||
50 | void __iomem *linkbase; | 50 | void __iomem *linkbase; |
51 | struct clk *dsit_clk; | 51 | struct clk *dsit_clk; |
52 | struct clk *dsip_clk; | 52 | struct clk *dsip_clk; |
53 | void *next_board_data; | ||
54 | void (*next_display_on)(void *board_data, struct fb_info *info); | ||
55 | void (*next_display_off)(void *board_data); | ||
53 | }; | 56 | }; |
54 | 57 | ||
55 | static struct sh_mipi *mipi_dsi[MAX_SH_MIPI_DSI]; | 58 | static struct sh_mipi *mipi_dsi[MAX_SH_MIPI_DSI]; |
@@ -122,12 +125,18 @@ static void mipi_display_on(void *arg, struct fb_info *info) | |||
122 | struct sh_mipi *mipi = arg; | 125 | struct sh_mipi *mipi = arg; |
123 | 126 | ||
124 | sh_mipi_dsi_enable(mipi, true); | 127 | sh_mipi_dsi_enable(mipi, true); |
128 | |||
129 | if (mipi->next_display_on) | ||
130 | mipi->next_display_on(mipi->next_board_data, info); | ||
125 | } | 131 | } |
126 | 132 | ||
127 | static void mipi_display_off(void *arg) | 133 | static void mipi_display_off(void *arg) |
128 | { | 134 | { |
129 | struct sh_mipi *mipi = arg; | 135 | struct sh_mipi *mipi = arg; |
130 | 136 | ||
137 | if (mipi->next_display_off) | ||
138 | mipi->next_display_off(mipi->next_board_data); | ||
139 | |||
131 | sh_mipi_dsi_enable(mipi, false); | 140 | sh_mipi_dsi_enable(mipi, false); |
132 | } | 141 | } |
133 | 142 | ||
@@ -443,6 +452,11 @@ static int __init sh_mipi_probe(struct platform_device *pdev) | |||
443 | mutex_unlock(&array_lock); | 452 | mutex_unlock(&array_lock); |
444 | platform_set_drvdata(pdev, mipi); | 453 | platform_set_drvdata(pdev, mipi); |
445 | 454 | ||
455 | /* Save original LCDC callbacks */ | ||
456 | mipi->next_board_data = pdata->lcd_chan->board_cfg.board_data; | ||
457 | mipi->next_display_on = pdata->lcd_chan->board_cfg.display_on; | ||
458 | mipi->next_display_off = pdata->lcd_chan->board_cfg.display_off; | ||
459 | |||
446 | /* Set up LCDC callbacks */ | 460 | /* Set up LCDC callbacks */ |
447 | pdata->lcd_chan->board_cfg.board_data = mipi; | 461 | pdata->lcd_chan->board_cfg.board_data = mipi; |
448 | pdata->lcd_chan->board_cfg.display_on = mipi_display_on; | 462 | pdata->lcd_chan->board_cfg.display_on = mipi_display_on; |