主题 : 编译了内核,背光不亮该怎么设置? 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 1386
精华: 0
发帖: 5
金钱: 50 两
威望: 50 点
综合积分: 10 分
注册时间: 2008-08-23
最后登录: 2010-03-04
楼主  发表于: 2009-02-11 21:54

 编译了内核,背光不亮该怎么设置?

编译了内核,搞定了lcd驱动,现在能显示出小企鹅,背光不亮,用灯照着才能看到小企鹅,请问该如何修改驱动?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-02-12 13:53
呵呵, 难道是国产凌凌漆里的LCD?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 1386
精华: 0
发帖: 5
金钱: 50 两
威望: 50 点
综合积分: 10 分
注册时间: 2008-08-23
最后登录: 2010-03-04
2楼  发表于: 2009-02-12 14:32
引用第1楼kasim于2009-02-12 13:53发表的 :
呵呵, 难道是国产凌凌漆里的LCD?

友善的3.5寸屏,找到了些关于backlight的函数,不知道怎么设定,版主帮我看看好吗?找了好久都没看到初始化,不知道初值该如何设置。
struct s3c2410_bl_mach_info {
int lcd_power_value;
int backlight_power_value;
int brightness_value;
int backlight_max;
int backlight_default;
void (*backlight_power)(int);
void (*set_brightness)(int);
void (*lcd_power)(int);
};


static struct s3c2410_bl_mach_info s3c2410bl_info;



void __init set_s3c2410bl_info(struct s3c2410_bl_mach_info *hard_s3c2410bl_info)
{
memcpy(&s3c2410bl_info,hard_s3c2410bl_info,sizeof(struct s3c2410_bl_mach_info));
s3c_device_bl.dev.platform_data = &s3c2410bl_info;
}



struct platform_device s3c_device_bl = {
.name = "s3c2410-bl",
.id = -1,
};
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-02-16 17:25
我没有看过实际的硬件连接, 不能确定3.5寸屏的背光控制是什么样的, 不过从mini2440的原理图看, LCD接口上似乎只有GPB1(PWM1的输出)可能是用来控制背光的, 你可以试试把GPB1输出高电平试试

"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2009-02-16 17:55
刚才看了mini2440内核源代码下面的drivers/char/mini2440_backlight.c, 看起来用的是LCD_PWR(GPG4)来控制背光的
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 侠客
UID: 2991
精华: 0
发帖: 108
金钱: 620 两
威望: 212 点
综合积分: 216 分
注册时间: 2008-12-20
最后登录: 2015-08-26
5楼  发表于: 2009-02-16 18:32
就我所知mini2440是用GPB1控制亮度,內核的GPG4是公板設計的用來控制背光亮度