Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
ea261051
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看板
提交
ea261051
编写于
9月 26, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bjorn-HID' into release
上级
6d7f18f6
57f3674f
变更
5
展开全部
隐藏空白更改
内联
并排
Showing
5 changed file
with
315 addition
and
483 deletion
+315
-483
drivers/acpi/bus.c
drivers/acpi/bus.c
+22
-27
drivers/acpi/scan.c
drivers/acpi/scan.c
+272
-433
drivers/pci/hotplug/acpiphp_ibm.c
drivers/pci/hotplug/acpiphp_ibm.c
+0
-1
drivers/pnp/pnpacpi/core.c
drivers/pnp/pnpacpi/core.c
+9
-12
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+12
-10
未找到文件。
drivers/acpi/bus.c
浏览文件 @
ea261051
...
...
@@ -94,36 +94,33 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
EXPORT_SYMBOL
(
acpi_bus_get_device
);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
)
acpi_status
acpi_bus_get_status_handle
(
acpi_handle
handle
,
unsigned
long
long
*
sta
)
{
acpi_status
status
=
AE_OK
;
unsigned
long
long
sta
=
0
;
acpi_status
status
;
if
(
!
device
)
return
-
EINVAL
;
status
=
acpi_evaluate_integer
(
handle
,
"_STA"
,
NULL
,
sta
);
if
(
ACPI_SUCCESS
(
status
))
return
AE_OK
;
/*
* Evaluate _STA if present.
*/
if
(
device
->
flags
.
dynamic_status
)
{
status
=
acpi_evaluate_integer
(
device
->
handle
,
"_STA"
,
NULL
,
&
sta
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
STRUCT_TO_INT
(
device
->
status
)
=
(
int
)
sta
;
if
(
status
==
AE_NOT_FOUND
)
{
*
sta
=
ACPI_STA_DEVICE_PRESENT
|
ACPI_STA_DEVICE_ENABLED
|
ACPI_STA_DEVICE_UI
|
ACPI_STA_DEVICE_FUNCTIONING
;
return
AE_OK
;
}
return
status
;
}
/*
* According to ACPI spec some device can be present and functional
* even if the parent is not present but functional.
* In such conditions the child device should not inherit the status
* from the parent.
*/
else
STRUCT_TO_INT
(
device
->
status
)
=
ACPI_STA_DEVICE_PRESENT
|
ACPI_STA_DEVICE_ENABLED
|
ACPI_STA_DEVICE_UI
|
ACPI_STA_DEVICE_FUNCTIONING
;
int
acpi_bus_get_status
(
struct
acpi_device
*
device
)
{
acpi_status
status
;
unsigned
long
long
sta
;
status
=
acpi_bus_get_status_handle
(
device
->
handle
,
&
sta
);
if
(
ACPI_FAILURE
(
status
))
return
-
ENODEV
;
STRUCT_TO_INT
(
device
->
status
)
=
(
int
)
sta
;
if
(
device
->
status
.
functional
&&
!
device
->
status
.
present
)
{
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Device [%s] status [%08x]: "
...
...
@@ -135,10 +132,8 @@ int acpi_bus_get_status(struct acpi_device *device)
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Device [%s] status [%08x]
\n
"
,
device
->
pnp
.
bus_id
,
(
u32
)
STRUCT_TO_INT
(
device
->
status
)));
return
0
;
}
EXPORT_SYMBOL
(
acpi_bus_get_status
);
void
acpi_bus_private_data_handler
(
acpi_handle
handle
,
...
...
drivers/acpi/scan.c
浏览文件 @
ea261051
此差异已折叠。
点击以展开。
drivers/pci/hotplug/acpiphp_ibm.c
浏览文件 @
ea261051
...
...
@@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle,
__func__
,
status
);
return
retval
;
}
info
->
hardware_id
.
string
[
sizeof
(
info
->
hardware_id
.
length
)
-
1
]
=
'\0'
;
if
(
info
->
current_status
&&
(
info
->
valid
&
ACPI_VALID_HID
)
&&
(
!
strcmp
(
info
->
hardware_id
.
string
,
IBM_HARDWARE_ID1
)
||
...
...
drivers/pnp/pnpacpi/core.c
浏览文件 @
ea261051
...
...
@@ -153,6 +153,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
acpi_handle
temp
=
NULL
;
acpi_status
status
;
struct
pnp_dev
*
dev
;
struct
acpi_hardware_id
*
id
;
/*
* If a PnPacpi device is not present , the device
...
...
@@ -193,15 +194,12 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
if
(
dev
->
capabilities
&
PNP_CONFIGURABLE
)
pnpacpi_parse_resource_option_data
(
dev
);
if
(
device
->
flags
.
compatible_ids
)
{
struct
acpica_device_id_list
*
cid_list
=
device
->
pnp
.
cid_list
;
int
i
;
for
(
i
=
0
;
i
<
cid_list
->
count
;
i
++
)
{
if
(
!
ispnpidacpi
(
cid_list
->
ids
[
i
].
string
))
continue
;
pnp_add_id
(
dev
,
cid_list
->
ids
[
i
].
string
);
}
list_for_each_entry
(
id
,
&
device
->
pnp
.
ids
,
list
)
{
if
(
!
strcmp
(
id
->
id
,
acpi_device_hid
(
device
)))
continue
;
if
(
!
ispnpidacpi
(
id
->
id
))
continue
;
pnp_add_id
(
dev
,
id
->
id
);
}
/* clear out the damaged flags */
...
...
@@ -232,9 +230,8 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp)
struct
pnp_dev
*
pnp
=
_pnp
;
/* true means it matched */
return
acpi
->
flags
.
hardware_id
&&
!
acpi_get_physical_device
(
acpi
->
handle
)
&&
compare_pnp_id
(
pnp
->
id
,
acpi
->
pnp
.
hardware_id
);
return
!
acpi_get_physical_device
(
acpi
->
handle
)
&&
compare_pnp_id
(
pnp
->
id
,
acpi_device_hid
(
acpi
));
}
static
int
__init
acpi_pnp_find_device
(
struct
device
*
dev
,
acpi_handle
*
handle
)
...
...
include/acpi/acpi_bus.h
浏览文件 @
ea261051
...
...
@@ -70,7 +70,6 @@ enum acpi_bus_device_type {
ACPI_BUS_TYPE_POWER
,
ACPI_BUS_TYPE_PROCESSOR
,
ACPI_BUS_TYPE_THERMAL
,
ACPI_BUS_TYPE_SYSTEM
,
ACPI_BUS_TYPE_POWER_BUTTON
,
ACPI_BUS_TYPE_SLEEP_BUTTON
,
ACPI_BUS_DEVICE_TYPE_COUNT
...
...
@@ -142,10 +141,7 @@ struct acpi_device_status {
struct
acpi_device_flags
{
u32
dynamic_status
:
1
;
u32
hardware_id
:
1
;
u32
compatible_ids
:
1
;
u32
bus_address
:
1
;
u32
unique_id
:
1
;
u32
removable
:
1
;
u32
ejectable
:
1
;
u32
lockable
:
1
;
...
...
@@ -154,7 +150,7 @@ struct acpi_device_flags {
u32
performance_manageable
:
1
;
u32
wake_capable
:
1
;
/* Wakeup(_PRW) supported? */
u32
force_power_state
:
1
;
u32
reserved
:
19
;
u32
reserved
:
22
;
};
/* File System */
...
...
@@ -172,20 +168,23 @@ typedef unsigned long acpi_bus_address;
typedef
char
acpi_device_name
[
40
];
typedef
char
acpi_device_class
[
20
];
struct
acpi_hardware_id
{
struct
list_head
list
;
char
*
id
;
};
struct
acpi_device_pnp
{
acpi_bus_id
bus_id
;
/* Object name */
acpi_bus_address
bus_address
;
/* _ADR */
char
*
hardware_id
;
/* _HID */
struct
acpica_device_id_list
*
cid_list
;
/* _CIDs */
char
*
unique_id
;
/* _UID */
struct
list_head
ids
;
/* _HID and _CIDs */
acpi_device_name
device_name
;
/* Driver-determined */
acpi_device_class
device_class
;
/* " */
};
#define acpi_device_bid(d) ((d)->pnp.bus_id)
#define acpi_device_adr(d) ((d)->pnp.bus_address)
#define acpi_device_hid(d) ((d)->pnp.hardware_id)
#define acpi_device_uid(d) ((d)->pnp.unique_id)
char
*
acpi_device_hid
(
struct
acpi_device
*
device
);
#define acpi_device_name(d) ((d)->pnp.device_name)
#define acpi_device_class(d) ((d)->pnp.device_class)
...
...
@@ -262,7 +261,8 @@ struct acpi_device_wakeup {
/* Device */
struct
acpi_device
{
acpi_handle
handle
;
int
device_type
;
acpi_handle
handle
;
/* no handle for fixed hardware */
struct
acpi_device
*
parent
;
struct
list_head
children
;
struct
list_head
node
;
...
...
@@ -322,6 +322,8 @@ extern void unregister_acpi_bus_notifier(struct notifier_block *nb);
int
acpi_bus_get_device
(
acpi_handle
handle
,
struct
acpi_device
**
device
);
void
acpi_bus_data_handler
(
acpi_handle
handle
,
void
*
context
);
acpi_status
acpi_bus_get_status_handle
(
acpi_handle
handle
,
unsigned
long
long
*
sta
);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
);
int
acpi_bus_get_power
(
acpi_handle
handle
,
int
*
state
);
int
acpi_bus_set_power
(
acpi_handle
handle
,
int
state
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录