mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] imx-ipu-fb: Add board specific hook to enable display
@ 2010-06-24 15:03 Eric Bénard
  2010-06-24 15:03 ` [PATCH 2/2] imx-ipu-fb: do not enable framebuffer on startup Eric Bénard
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bénard @ 2010-06-24 15:03 UTC (permalink / raw)
  To: barebox

Signed-off-by: Eric Bénard <eric@eukrea.com>
---
 arch/arm/mach-imx/include/mach/imx-ipu-fb.h |    2 ++
 drivers/video/imx-ipu-fb.c                  |    8 ++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/include/mach/imx-ipu-fb.h b/arch/arm/mach-imx/include/mach/imx-ipu-fb.h
index 53c6d26..dd65b04 100644
--- a/arch/arm/mach-imx/include/mach/imx-ipu-fb.h
+++ b/arch/arm/mach-imx/include/mach/imx-ipu-fb.h
@@ -28,6 +28,8 @@ struct imx_ipu_fb_platform_data {
 	const struct fb_videomode	*mode;
 	unsigned char		bpp;
 	void __iomem		*framebuffer;
+	/** hook to enable backlight and stuff */
+	void			(*enable)(int enable);
 };
 
 #endif /* __MACH_IMX_IPU_FB_H__ */
diff --git a/drivers/video/imx-ipu-fb.c b/drivers/video/imx-ipu-fb.c
index 6d1eb5e..8994da4 100644
--- a/drivers/video/imx-ipu-fb.c
+++ b/drivers/video/imx-ipu-fb.c
@@ -36,6 +36,8 @@
 struct ipu_fb_info {
 	void __iomem		*regs;
 
+	void			(*enable)(int enable);
+
 	struct fb_info		info;
 	struct device_d		*dev;
 };
@@ -828,6 +830,8 @@ static void ipu_fb_enable(struct fb_info *info)
 	 * Linux driver calls sdc_set_brightness() here again,
 	 * once is enough for us
 	 */
+	if (fbi->enable)
+		fbi->enable(1);
 }
 
 static void ipu_fb_disable(struct fb_info *info)
@@ -835,6 +839,9 @@ static void ipu_fb_disable(struct fb_info *info)
 	struct ipu_fb_info *fbi = info->priv;
 	u32 reg;
 
+	if (fbi->enable)
+		fbi->enable(0);
+
 	reg = reg_read(fbi, SDC_COM_CONF);
 	reg &= ~SDC_COM_BG_EN;
 	reg_write(fbi, reg, SDC_COM_CONF);
@@ -866,6 +873,7 @@ static int imxfb_probe(struct device_d *dev)
 	info->yres = pdata->mode->yres;
 	info->bits_per_pixel = pdata->bpp;
 	info->fbops = &imxfb_ops;
+	fbi->enable = pdata->enable;
 
 	dev_info(dev, "i.MX Framebuffer driver\n");
 
-- 
1.6.3.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-24 15:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-24 15:03 [PATCH 1/2] imx-ipu-fb: Add board specific hook to enable display Eric Bénard
2010-06-24 15:03 ` [PATCH 2/2] imx-ipu-fb: do not enable framebuffer on startup Eric Bénard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox