fbdev: sh_mobile_lcdcfb: add backlight support
Subsystems (2)
PATCH 1/2 fbdev: sh_mobile_lcdcfb: add backlight support
Support for LCD backlight devices controlled through a GPIO to the LCDC driver. Backlights can be defined per-channel and follow fbdev directives to switch off as the LCD blanks.
Signed-off-by Alexandre Courbot <[email protected]>
--- drivers/video/Kconfig | 1 + drivers/video/sh_mobile_lcdcfb.c | 73 ++++++++++++++++++++++++++++++++++++++ drivers/video/sh_mobile_lcdcfb.h | 2 + include/video/sh_mobile_lcdc.h | 7 ++++ 4 files changed, 83 insertions(+), 0 deletions(-)
drivers/video/Kconfig +1 -0
@@ -2005,6 +2005,7 @@ config FB_SH_MOBILE_LCDC select FB_SYS_IMAGEBLIT select FB_SYS_FOPS select FB_DEFERRED_IO + select FB_BACKLIGHT select SH_MIPI_DSI if SH_LCD_MIPI_DSI ---help--- Frame buffer driver for the on-chip SH-Mobile LCD controller.
drivers/video/sh_mobile_lcdcfb.c +73 -0
105 lines not on this page · raw message
drivers/video/sh_mobile_lcdcfb.h +2 -0
@@ -17,6 +17,7 @@ enum { LDDCKPAT1R, LDDCKPAT2R, LDMT1R, LDMT2R, LDMT3R, LDDFR, LDSM1R,struct sh_mobile_lcdc_priv ;struct fb_info ; +struct backlight_device ;struct sh_mobile_lcdc_chan {struct sh_mobile_lcdc_priv *lcdc;unsigned long *reg_offs;
@@ -26,6 +27,7 @@ struct sh_mobile_lcdc_chan {u32 pseudo_palette[PALETTE_NR ];unsigned long saved_ch_regs[NR_CH_REGS ];struct fb_info *info; +struct backlight_device *bl;dma_addr_t dma_handle;struct fb_deferred_io defio;struct scatterlist *sglist;
include/video/sh_mobile_lcdc.h +7 -0
@@ -66,6 +66,12 @@ struct sh_mobile_lcdc_lcd_size_cfg { /* width and height of panel in mm */unsigned long height; }; +/* backlight info */ +struct sh_mobile_lcdc_bl_info { +const char *name; +int gpio; +}; +struct sh_mobile_lcdc_chan_cfg {int chan;int bpp;
@@ -73,6 +79,7 @@ struct sh_mobile_lcdc_chan_cfg {int clock_divider;unsigned long flags;/* LCDC_FLAGS_... */ const struct fb_videomode *lcd_cfg; +struct sh_mobile_lcdc_bl_info *bl_info;int num_cfg;struct sh_mobile_lcdc_lcd_size_cfg lcd_size_cfg;struct sh_mobile_lcdc_board_cfg board_cfg;
Signature · 1 line
1.7.4