mach-smdkv210.c
修改代码:
//设置背光:
static voidsmdkv210_lte480wv_set_power(struct plat_lcd_data *pd,
unsignedint power)
{
if(power) {
#if !defined(CONFIG_BACKLIGHT_PWM)//openthe backlight
gpio_request_one(S5PV210_GPD0(3),GPIOF_OUT_INIT_HIGH, "GPD0");
gpio_free(S5PV210_GPD0(3));
#endif
}else {
#if !defined(CONFIG_BACKLIGHT_PWM)
gpio_request_one(S5PV210_GPD0(3),GPIOF_OUT_INIT_LOW, "GPD0");
gpio_free(S5PV210_GPD0(3));
#endif
}
}
static struct plat_lcd_datasmdkv210_lcd_lte480wv_data = {
.set_power = smdkv210_lte480wv_set_power,
};
static struct platform_devicesmdkv210_lcd_lte480wv = {
.name = "platform-lcd",
.dev.parent = &s3c_device_fb.dev,
.dev.platform_data = &smdkv210_lcd_lte480wv_data,
};
//参考数据手册设置,若使用原来的值,直接花屏
static struct s3c_fb_pd_winsmdkv210_fb_win0 = {
.win_mode= {
.left_margin = 45,//46-1
.right_margin = 209,//210-1
.upper_margin = 22,//23-1
.lower_margin = 21,//22-1
.hsync_len = 39,
.vsync_len = 19,
.xres = 800,
.yres = 480,
},
.max_bpp = 32,
.default_bpp = 24,
};
static struct s3c_fb_platdatasmdkv210_lcd0_pdata __initdata = {
.win[0] = &smdkv210_fb_win0,
.vidcon0 = (4<<6) |(1<<4)|(1<<0)|(1<<1),//VIDCON0_VIDOUT_RGB |VIDCON0_PNRMODE_RGB,
.vidcon1 =1<<5 | 1<<6, //VIDCON1_INV_HSYNC| VIDCON1_INV_VSYNC,
.setup_gpio = s5pv210_fb_gpio_setup_24bpp,
配置内核
http://blog.csdn.net/liujia2100/article/details/8918141