Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
597e4fab
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,发现更多精彩内容 >>
提交
597e4fab
编写于
11月 11, 2008
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bugzilla-11312' into release
上级
3ad4f597
ed206fac
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
20 deletion
+22
-20
Documentation/ABI/testing/sysfs-firmware-acpi
Documentation/ABI/testing/sysfs-firmware-acpi
+8
-8
drivers/acpi/events/evxfevnt.c
drivers/acpi/events/evxfevnt.c
+6
-0
drivers/acpi/system.c
drivers/acpi/system.c
+7
-12
include/acpi/actypes.h
include/acpi/actypes.h
+1
-0
未找到文件。
Documentation/ABI/testing/sysfs-firmware-acpi
浏览文件 @
597e4fab
...
...
@@ -89,7 +89,7 @@ Description:
error - an interrupt that can't be accounted for above.
invalid: it's either a
wakeup GPE or a GPE/
Fixed Event that
invalid: it's either a
GPE or a
Fixed Event that
doesn't have an event handler.
disable: the GPE/Fixed Event is valid but disabled.
...
...
@@ -117,30 +117,30 @@ Description:
and other user space applications so that the machine won't shutdown
when pressing the power button.
# cat ff_pwr_btn
0
0
enabled
# press the power button for 3 times;
# cat ff_pwr_btn
3
3
enabled
# echo disable > ff_pwr_btn
# cat ff_pwr_btn
disable
3 disabled
# press the power button for 3 times;
# cat ff_pwr_btn
disable
3 disabled
# echo enable > ff_pwr_btn
# cat ff_pwr_btn
4
4
enabled
/*
* this is because the status bit is set even if the enable bit is cleared,
* and it triggers an ACPI fixed event when the enable bit is set again
*/
# press the power button for 3 times;
# cat ff_pwr_btn
7
7
enabled
# echo disable > ff_pwr_btn
# press the power button for 3 times;
# echo clear > ff_pwr_btn /* clear the status bit */
# echo disable > ff_pwr_btn
# cat ff_pwr_btn
7
7
enabled
drivers/acpi/events/evxfevnt.c
浏览文件 @
597e4fab
...
...
@@ -521,6 +521,9 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
if
(
value
)
*
event_status
|=
ACPI_EVENT_FLAG_SET
;
if
(
acpi_gbl_fixed_event_handlers
[
event
].
handler
)
*
event_status
|=
ACPI_EVENT_FLAG_HANDLE
;
return_ACPI_STATUS
(
status
);
}
...
...
@@ -571,6 +574,9 @@ acpi_get_gpe_status(acpi_handle gpe_device,
status
=
acpi_hw_get_gpe_status
(
gpe_event_info
,
event_status
);
if
(
gpe_event_info
->
flags
&
ACPI_GPE_DISPATCH_MASK
)
*
event_status
|=
ACPI_EVENT_FLAG_HANDLE
;
unlock_and_exit:
if
(
flags
&
ACPI_NOT_ISR
)
{
(
void
)
acpi_ut_release_mutex
(
ACPI_MTX_EVENTS
);
...
...
drivers/acpi/system.c
浏览文件 @
597e4fab
...
...
@@ -167,7 +167,6 @@ static int acpi_system_sysfs_init(void)
#define COUNT_ERROR 2
/* other */
#define NUM_COUNTERS_EXTRA 3
#define ACPI_EVENT_VALID 0x01
struct
event_counter
{
u32
count
;
u32
flags
;
...
...
@@ -312,12 +311,6 @@ static int get_status(u32 index, acpi_event_status *status, acpi_handle *handle)
}
else
if
(
index
<
(
num_gpes
+
ACPI_NUM_FIXED_EVENTS
))
result
=
acpi_get_event_status
(
index
-
num_gpes
,
status
);
/*
* sleep/power button GPE/Fixed Event is enabled after acpi_system_init,
* check the status at runtime and mark it as valid once it's enabled
*/
if
(
!
result
&&
(
*
status
&
ACPI_EVENT_FLAG_ENABLED
))
all_counters
[
index
].
flags
|=
ACPI_EVENT_VALID
;
end:
return
result
;
}
...
...
@@ -346,12 +339,14 @@ static ssize_t counter_show(struct kobject *kobj,
if
(
result
)
goto
end
;
if
(
!
(
all_counters
[
index
].
flags
&
ACPI_EVENT_VALID
))
size
+=
sprintf
(
buf
+
size
,
"
invalid"
);
if
(
!
(
status
&
ACPI_EVENT_FLAG_HANDLE
))
size
+=
sprintf
(
buf
+
size
,
"
invalid"
);
else
if
(
status
&
ACPI_EVENT_FLAG_ENABLED
)
size
+=
sprintf
(
buf
+
size
,
" enable"
);
size
+=
sprintf
(
buf
+
size
,
" enabled"
);
else
if
(
status
&
ACPI_EVENT_FLAG_WAKE_ENABLED
)
size
+=
sprintf
(
buf
+
size
,
" wake_enabled"
);
else
size
+=
sprintf
(
buf
+
size
,
"
disable
"
);
size
+=
sprintf
(
buf
+
size
,
"
disabled
"
);
end:
size
+=
sprintf
(
buf
+
size
,
"
\n
"
);
...
...
@@ -385,7 +380,7 @@ static ssize_t counter_set(struct kobject *kobj,
if
(
result
)
goto
end
;
if
(
!
(
all_counters
[
index
].
flags
&
ACPI_EVENT_VALID
))
{
if
(
!
(
status
&
ACPI_EVENT_FLAG_HANDLE
))
{
printk
(
KERN_WARNING
PREFIX
"Can not change Invalid GPE/Fixed Event status
\n
"
);
return
-
EINVAL
;
...
...
include/acpi/actypes.h
浏览文件 @
597e4fab
...
...
@@ -525,6 +525,7 @@ typedef u32 acpi_event_status;
#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02
#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04
#define ACPI_EVENT_FLAG_HANDLE (acpi_event_status) 0x08
/*
* General Purpose Events (GPE)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录