Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
0ca9413c
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0ca9413c
编写于
10月 22, 2008
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'thinkpad' into test
上级
acd41d36
d64c81c4
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
61 addition
and
2 deletion
+61
-2
drivers/misc/thinkpad_acpi.c
drivers/misc/thinkpad_acpi.c
+61
-2
未找到文件。
drivers/misc/thinkpad_acpi.c
浏览文件 @
0ca9413c
...
...
@@ -158,7 +158,6 @@ enum {
#define TPACPI_INFO KERN_INFO TPACPI_LOG
#define TPACPI_DEBUG KERN_DEBUG TPACPI_LOG
#define TPACPI_DBG_ALL 0xffff
#define TPACPI_DBG_ALL 0xffff
#define TPACPI_DBG_INIT 0x0001
#define TPACPI_DBG_EXIT 0x0002
...
...
@@ -582,7 +581,8 @@ static int __init register_tpacpi_subdriver(struct ibm_struct *ibm)
ibm
->
acpi
->
driver
=
kzalloc
(
sizeof
(
struct
acpi_driver
),
GFP_KERNEL
);
if
(
!
ibm
->
acpi
->
driver
)
{
printk
(
TPACPI_ERR
"kzalloc(ibm->driver) failed
\n
"
);
printk
(
TPACPI_ERR
"failed to allocate memory for ibm->acpi->driver
\n
"
);
return
-
ENOMEM
;
}
...
...
@@ -838,6 +838,13 @@ static int parse_strtoul(const char *buf,
return
0
;
}
static
void
tpacpi_disable_brightness_delay
(
void
)
{
if
(
acpi_evalf
(
hkey_handle
,
NULL
,
"PWMS"
,
"qvd"
,
0
))
printk
(
TPACPI_NOTICE
"ACPI backlight control delay disabled
\n
"
);
}
static
int
__init
tpacpi_query_bcl_levels
(
acpi_handle
handle
)
{
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
...
...
@@ -2139,6 +2146,8 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
if
(
!
tp_features
.
hotkey
)
return
1
;
tpacpi_disable_brightness_delay
();
hotkey_dev_attributes
=
create_attr_set
(
13
,
NULL
);
if
(
!
hotkey_dev_attributes
)
return
-
ENOMEM
;
...
...
@@ -2512,6 +2521,8 @@ static void hotkey_suspend(pm_message_t state)
static
void
hotkey_resume
(
void
)
{
tpacpi_disable_brightness_delay
();
if
(
hotkey_mask_get
())
printk
(
TPACPI_ERR
"error while trying to read hot key mask "
...
...
@@ -5983,6 +5994,52 @@ static void fan_exit(void)
flush_workqueue
(
tpacpi_wq
);
}
static
void
fan_suspend
(
pm_message_t
state
)
{
if
(
!
fan_control_allowed
)
return
;
/* Store fan status in cache */
fan_get_status_safe
(
NULL
);
if
(
tp_features
.
fan_ctrl_status_undef
)
fan_control_desired_level
=
TP_EC_FAN_AUTO
;
}
static
void
fan_resume
(
void
)
{
u8
saved_fan_level
;
u8
current_level
=
7
;
bool
do_set
=
false
;
/* DSDT *always* updates status on resume */
tp_features
.
fan_ctrl_status_undef
=
0
;
saved_fan_level
=
fan_control_desired_level
;
if
(
!
fan_control_allowed
||
(
fan_get_status_safe
(
&
current_level
)
<
0
))
return
;
switch
(
fan_control_access_mode
)
{
case
TPACPI_FAN_WR_ACPI_SFAN
:
do_set
=
(
saved_fan_level
>
current_level
);
break
;
case
TPACPI_FAN_WR_ACPI_FANS
:
case
TPACPI_FAN_WR_TPEC
:
do_set
=
((
saved_fan_level
&
TP_EC_FAN_FULLSPEED
)
||
(
saved_fan_level
==
7
&&
!
(
current_level
&
TP_EC_FAN_FULLSPEED
)));
break
;
default:
return
;
}
if
(
do_set
)
{
printk
(
TPACPI_NOTICE
"restoring fan level to 0x%02x
\n
"
,
saved_fan_level
);
fan_set_level_safe
(
saved_fan_level
);
}
}
static
int
fan_read
(
char
*
p
)
{
int
len
=
0
;
...
...
@@ -6174,6 +6231,8 @@ static struct ibm_struct fan_driver_data = {
.
read
=
fan_read
,
.
write
=
fan_write
,
.
exit
=
fan_exit
,
.
suspend
=
fan_suspend
,
.
resume
=
fan_resume
,
};
/****************************************************************************
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录