diff options
author | Magnus Damm <damm@opensource.se> | 2010-11-17 06:44:54 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-11-19 17:02:58 +0900 |
commit | 6722a4016d7f5f107a82ad71a3ee1ccec105532f (patch) | |
tree | ffee60b93d78fe65a7293e8d6be66c2e91cc1b63 /drivers/video/sh_mipi_dsi.c | |
parent | deaba190188f1caa2317de4df6c9aaba501f9809 (diff) | |
download | linux-6722a4016d7f5f107a82ad71a3ee1ccec105532f.tar.bz2 |
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 { void __iomem *linkbase; struct clk *dsit_clk; struct clk *dsip_clk; + void *next_board_data; + void (*next_display_on)(void *board_data, struct fb_info *info); + void (*next_display_off)(void *board_data); }; 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) struct sh_mipi *mipi = arg; sh_mipi_dsi_enable(mipi, true); + + if (mipi->next_display_on) + mipi->next_display_on(mipi->next_board_data, info); } static void mipi_display_off(void *arg) { struct sh_mipi *mipi = arg; + if (mipi->next_display_off) + mipi->next_display_off(mipi->next_board_data); + sh_mipi_dsi_enable(mipi, false); } @@ -443,6 +452,11 @@ static int __init sh_mipi_probe(struct platform_device *pdev) mutex_unlock(&array_lock); platform_set_drvdata(pdev, mipi); + /* Save original LCDC callbacks */ + mipi->next_board_data = pdata->lcd_chan->board_cfg.board_data; + mipi->next_display_on = pdata->lcd_chan->board_cfg.display_on; + mipi->next_display_off = pdata->lcd_chan->board_cfg.display_off; + /* Set up LCDC callbacks */ pdata->lcd_chan->board_cfg.board_data = mipi; pdata->lcd_chan->board_cfg.display_on = mipi_display_on; |