fb i.MX23/28: add platform data hook to enable backlight
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
26aeeb97a0
commit
8e61335543
|
@ -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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue