summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-01-20 10:13:15 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-20 10:33:30 +0100
commit8e61335543688546abe4afae4ac8d1956575171f (patch)
treea913c91a2bc0146b3952c3406e2b52cd4b2e858d
parent26aeeb97a09d3850a997a48a3e25c1aecb7b4b42 (diff)
downloadbarebox-8e61335543688546abe4afae4ac8d1956575171f.tar.gz
barebox-8e61335543688546abe4afae4ac8d1956575171f.tar.xz
fb i.MX23/28: add platform data hook to enable backlight
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-stm/include/mach/fb.h2
-rw-r--r--drivers/video/stm.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/mach-stm/include/mach/fb.h b/arch/arm/mach-stm/include/mach/fb.h
index 2eade76eb2..3c53f1a20e 100644
--- a/arch/arm/mach-stm/include/mach/fb.h
+++ b/arch/arm/mach-stm/include/mach/fb.h
@@ -40,6 +40,8 @@ struct imx_fb_videomode {
void *fixed_screen; /**< if != NULL use this as framebuffer memory */
unsigned fixed_screen_size; /**< framebuffer memory size for fixed_screen */
+
+ void (*enable)(int enable); /**< hook to enable backlight */
};
#endif /* __MACH_FB_H */
diff --git a/drivers/video/stm.c b/drivers/video/stm.c
index fc90b6a912..8d6361e936 100644
--- a/drivers/video/stm.c
+++ b/drivers/video/stm.c
@@ -255,6 +255,9 @@ static void stmfb_enable_controller(struct fb_info *fb_info)
writel(CTRL1_FIFO_CLEAR, fbi->base + HW_LCDIF_CTRL1 + BIT_CLR);
/* start the engine right now */
writel(CTRL_RUN, fbi->base + HW_LCDIF_CTRL + BIT_SET);
+
+ if (fbi->pdata->enable)
+ fbi->pdata->enable(1);
}
static void stmfb_disable_controller(struct fb_info *fb_info)
@@ -263,6 +266,9 @@ static void stmfb_disable_controller(struct fb_info *fb_info)
unsigned loop;
uint32_t reg;
+ if (fbi->pdata->enable)
+ fbi->pdata->enable(0);
+
/*
* Even if we disable the controller here, it will still continue
* until its FIFOs are running out of data