From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Magnus Damm <magnus.damm@gmail.com>,
lethal@linux-sh.org, g.liakhovetski@gmx.de,
linux-sh@vger.kernel.org
Subject: [PATCH 05/05] fbdev: sh_mipi_dsi: Allow LCDC board callbacks
Date: Wed, 17 Nov 2010 15:44:54 +0900 [thread overview]
Message-ID: <20101117064454.18139.40718.sendpatchset@t400s> (raw)
In-Reply-To: <20101117064405.18139.57035.sendpatchset@t400s>
From: Magnus Damm <damm@opensource.se>
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>
---
drivers/video/sh_mipi_dsi.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- 0008/drivers/video/sh_mipi_dsi.c
+++ work/drivers/video/sh_mipi_dsi.c 2010-11-16 17:41:32.000000000 +0900
@@ -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, s
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);
}
@@ -431,6 +440,11 @@ static int __init sh_mipi_probe(struct p
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;
next prev parent reply other threads:[~2010-11-17 6:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-17 6:44 [PATCH 00/05] fbdev: SH-Mobile MIPI-DSI Update Magnus Damm
2010-11-17 6:44 ` [PATCH 01/05] fbdev: sh_mipi_dsi: Remove request/release mem region Magnus Damm
2010-11-17 7:25 ` Paul Mundt
2010-11-17 8:51 ` Magnus Damm
2010-11-17 9:30 ` Paul Mundt
2010-11-17 10:06 ` Magnus Damm
2010-11-17 6:44 ` [PATCH 02/05] fbdev: sh_mipi_dsi: Make use of register names Magnus Damm
2010-11-17 6:44 ` [PATCH 03/05] ARM: mach-shmobile: Extend AP4EVB MIPI-DSI resources Magnus Damm
2010-11-17 6:44 ` [PATCH 04/05] fbdev: sh_mipi_dsi: Require two I/O resources Magnus Damm
2010-11-17 6:44 ` Magnus Damm [this message]
2010-11-17 7:48 ` [PATCH 00/05] fbdev: SH-Mobile MIPI-DSI Update Guennadi Liakhovetski
2010-11-19 8:05 ` Paul Mundt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101117064454.18139.40718.sendpatchset@t400s \
--to=magnus.damm@gmail.com \
--cc=g.liakhovetski@gmx.de \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox