Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
bbbcde9d
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bbbcde9d
编写于
12月 26, 2010
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'bugzilla-25412' and 'bugzilla-25302' into release
上级
d7c1255a
5acdb1af
cde44d17
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
63 addition
and
42 deletion
+63
-42
drivers/acpi/acpica/evgpeinit.c
drivers/acpi/acpica/evgpeinit.c
+3
-0
drivers/acpi/battery.c
drivers/acpi/battery.c
+0
-5
drivers/acpi/scan.c
drivers/acpi/scan.c
+60
-37
未找到文件。
drivers/acpi/acpica/evgpeinit.c
浏览文件 @
bbbcde9d
...
...
@@ -408,6 +408,9 @@ acpi_ev_match_gpe_method(acpi_handle obj_handle,
return_ACPI_STATUS
(
AE_OK
);
}
/* Disable the GPE in case it's been enabled already. */
(
void
)
acpi_hw_low_set_gpe
(
gpe_event_info
,
ACPI_GPE_DISABLE
);
/*
* Add the GPE information from above to the gpe_event_info block for
* use during dispatch of this GPE.
...
...
drivers/acpi/battery.c
浏览文件 @
bbbcde9d
...
...
@@ -130,8 +130,6 @@ struct acpi_battery {
unsigned
long
flags
;
};
static
int
acpi_battery_update
(
struct
acpi_battery
*
battery
);
#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
inline
int
acpi_battery_present
(
struct
acpi_battery
*
battery
)
...
...
@@ -186,9 +184,6 @@ static int acpi_battery_get_property(struct power_supply *psy,
int
ret
=
0
;
struct
acpi_battery
*
battery
=
to_acpi_battery
(
psy
);
if
(
acpi_battery_update
(
battery
))
return
-
ENODEV
;
if
(
acpi_battery_present
(
battery
))
{
/* run battery update only if it is present */
acpi_battery_get_state
(
battery
);
...
...
drivers/acpi/scan.c
浏览文件 @
bbbcde9d
...
...
@@ -705,54 +705,85 @@ static int acpi_bus_get_perf_flags(struct acpi_device *device)
}
static
acpi_status
acpi_bus_extract_wakeup_device_power_package
(
struct
acpi_device
*
devic
e
,
union
acpi_object
*
package
)
acpi_bus_extract_wakeup_device_power_package
(
acpi_handle
handl
e
,
struct
acpi_device_wakeup
*
wakeup
)
{
int
i
=
0
;
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
union
acpi_object
*
package
=
NULL
;
union
acpi_object
*
element
=
NULL
;
acpi_status
status
;
int
i
=
0
;
if
(
!
device
||
!
package
||
(
package
->
package
.
count
<
2
)
)
if
(
!
wakeup
)
return
AE_BAD_PARAMETER
;
/* _PRW */
status
=
acpi_evaluate_object
(
handle
,
"_PRW"
,
NULL
,
&
buffer
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Evaluating _PRW"
));
return
status
;
}
package
=
(
union
acpi_object
*
)
buffer
.
pointer
;
if
(
!
package
||
(
package
->
package
.
count
<
2
))
{
status
=
AE_BAD_DATA
;
goto
out
;
}
element
=
&
(
package
->
package
.
elements
[
0
]);
if
(
!
element
)
return
AE_BAD_PARAMETER
;
if
(
!
element
)
{
status
=
AE_BAD_DATA
;
goto
out
;
}
if
(
element
->
type
==
ACPI_TYPE_PACKAGE
)
{
if
((
element
->
package
.
count
<
2
)
||
(
element
->
package
.
elements
[
0
].
type
!=
ACPI_TYPE_LOCAL_REFERENCE
)
||
(
element
->
package
.
elements
[
1
].
type
!=
ACPI_TYPE_INTEGER
))
return
AE_BAD_DATA
;
device
->
wakeup
.
gpe_device
=
||
(
element
->
package
.
elements
[
1
].
type
!=
ACPI_TYPE_INTEGER
))
{
status
=
AE_BAD_DATA
;
goto
out
;
}
wakeup
->
gpe_device
=
element
->
package
.
elements
[
0
].
reference
.
handle
;
device
->
wakeup
.
gpe_number
=
wakeup
->
gpe_number
=
(
u32
)
element
->
package
.
elements
[
1
].
integer
.
value
;
}
else
if
(
element
->
type
==
ACPI_TYPE_INTEGER
)
{
device
->
wakeup
.
gpe_number
=
element
->
integer
.
value
;
}
else
return
AE_BAD_DATA
;
wakeup
->
gpe_device
=
NULL
;
wakeup
->
gpe_number
=
element
->
integer
.
value
;
}
else
{
status
=
AE_BAD_DATA
;
goto
out
;
}
element
=
&
(
package
->
package
.
elements
[
1
]);
if
(
element
->
type
!=
ACPI_TYPE_INTEGER
)
{
return
AE_BAD_DATA
;
status
=
AE_BAD_DATA
;
goto
out
;
}
device
->
wakeup
.
sleep_state
=
element
->
integer
.
value
;
wakeup
->
sleep_state
=
element
->
integer
.
value
;
if
((
package
->
package
.
count
-
2
)
>
ACPI_MAX_HANDLES
)
{
return
AE_NO_MEMORY
;
status
=
AE_NO_MEMORY
;
goto
out
;
}
device
->
wakeup
.
resources
.
count
=
package
->
package
.
count
-
2
;
for
(
i
=
0
;
i
<
device
->
wakeup
.
resources
.
count
;
i
++
)
{
wakeup
->
resources
.
count
=
package
->
package
.
count
-
2
;
for
(
i
=
0
;
i
<
wakeup
->
resources
.
count
;
i
++
)
{
element
=
&
(
package
->
package
.
elements
[
i
+
2
]);
if
(
element
->
type
!=
ACPI_TYPE_LOCAL_REFERENCE
)
return
AE_BAD_DATA
;
if
(
element
->
type
!=
ACPI_TYPE_LOCAL_REFERENCE
)
{
status
=
AE_BAD_DATA
;
goto
out
;
}
device
->
wakeup
.
resources
.
handles
[
i
]
=
element
->
reference
.
handle
;
wakeup
->
resources
.
handles
[
i
]
=
element
->
reference
.
handle
;
}
acpi_gpe_can_wake
(
device
->
wakeup
.
gpe_device
,
device
->
wakeup
.
gpe_number
);
acpi_gpe_can_wake
(
wakeup
->
gpe_device
,
wakeup
->
gpe_number
);
return
AE_OK
;
out:
kfree
(
buffer
.
pointer
);
return
status
;
}
static
void
acpi_bus_set_run_wake_flags
(
struct
acpi_device
*
device
)
...
...
@@ -787,26 +818,15 @@ static void acpi_bus_set_run_wake_flags(struct acpi_device *device)
static
int
acpi_bus_get_wakeup_device_flags
(
struct
acpi_device
*
device
)
{
acpi_status
status
=
0
;
struct
acpi_buffer
buffer
=
{
ACPI_ALLOCATE_BUFFER
,
NULL
};
union
acpi_object
*
package
=
NULL
;
int
psw_error
;
/* _PRW */
status
=
acpi_evaluate_object
(
device
->
handle
,
"_PRW"
,
NULL
,
&
buffer
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Evaluating _PRW"
));
goto
end
;
}
package
=
(
union
acpi_object
*
)
buffer
.
pointer
;
status
=
acpi_bus_extract_wakeup_device_power_package
(
device
,
package
);
status
=
acpi_bus_extract_wakeup_device_power_package
(
device
->
handle
,
&
device
->
wakeup
);
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"Extracting _PRW package"
));
goto
end
;
}
kfree
(
buffer
.
pointer
);
device
->
wakeup
.
flags
.
valid
=
1
;
device
->
wakeup
.
prepare_count
=
0
;
acpi_bus_set_run_wake_flags
(
device
);
...
...
@@ -1351,6 +1371,7 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
struct
acpi_bus_ops
*
ops
=
context
;
int
type
;
unsigned
long
long
sta
;
struct
acpi_device_wakeup
wakeup
;
struct
acpi_device
*
device
;
acpi_status
status
;
int
result
;
...
...
@@ -1360,8 +1381,10 @@ static acpi_status acpi_bus_check_add(acpi_handle handle, u32 lvl,
return
AE_OK
;
if
(
!
(
sta
&
ACPI_STA_DEVICE_PRESENT
)
&&
!
(
sta
&
ACPI_STA_DEVICE_FUNCTIONING
))
!
(
sta
&
ACPI_STA_DEVICE_FUNCTIONING
))
{
acpi_bus_extract_wakeup_device_power_package
(
handle
,
&
wakeup
);
return
AE_CTRL_DEPTH
;
}
/*
* We may already have an acpi_device from a previous enumeration. If
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录