Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
25c87f7f
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 大约 4 年
通知
14
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
25c87f7f
编写于
8月 25, 2007
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull events into release branch
Conflicts: drivers/acpi/video.c Signed-off-by:
N
Len Brown
<
len.brown@intel.com
>
上级
a4fd4946
3e069ee0
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
123 addition
and
50 deletion
+123
-50
Documentation/feature-removal-schedule.txt
Documentation/feature-removal-schedule.txt
+8
-0
drivers/acpi/Kconfig
drivers/acpi/Kconfig
+14
-0
drivers/acpi/ac.c
drivers/acpi/ac.c
+4
-1
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+1
-1
drivers/acpi/battery.c
drivers/acpi/battery.c
+4
-1
drivers/acpi/bus.c
drivers/acpi/bus.c
+4
-6
drivers/acpi/button.c
drivers/acpi/button.c
+1
-1
drivers/acpi/event.c
drivers/acpi/event.c
+17
-5
drivers/acpi/processor_core.c
drivers/acpi/processor_core.c
+10
-3
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+2
-1
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+16
-4
drivers/acpi/video.c
drivers/acpi/video.c
+10
-10
drivers/char/sonypi.c
drivers/char/sonypi.c
+1
-1
drivers/misc/asus-laptop.c
drivers/misc/asus-laptop.c
+1
-1
drivers/misc/sony-laptop.c
drivers/misc/sony-laptop.c
+2
-2
drivers/misc/thinkpad_acpi.c
drivers/misc/thinkpad_acpi.c
+17
-9
drivers/pci/hotplug/acpiphp_ibm.c
drivers/pci/hotplug/acpiphp_ibm.c
+4
-1
include/acpi/acpi_bus.h
include/acpi/acpi_bus.h
+7
-3
未找到文件。
Documentation/feature-removal-schedule.txt
浏览文件 @
25c87f7f
...
@@ -197,6 +197,14 @@ Who: Len Brown <len.brown@intel.com>
...
@@ -197,6 +197,14 @@ Who: Len Brown <len.brown@intel.com>
---------------------------
---------------------------
What: /proc/acpi/event
When: February 2008
Why: /proc/acpi/event has been replaced by events via the input layer
and netlink since 2.6.23.
Who: Len Brown <len.brown@intel.com>
---------------------------
What: Compaq touchscreen device emulation
What: Compaq touchscreen device emulation
When: Oct 2007
When: Oct 2007
Files: drivers/input/tsdev.c
Files: drivers/input/tsdev.c
...
...
drivers/acpi/Kconfig
浏览文件 @
25c87f7f
...
@@ -68,6 +68,20 @@ config ACPI_PROCFS
...
@@ -68,6 +68,20 @@ config ACPI_PROCFS
Say N to delete /proc/acpi/ files that have moved to /sys/
Say N to delete /proc/acpi/ files that have moved to /sys/
config ACPI_PROC_EVENT
bool "Deprecated /proc/acpi/event support"
depends on PROC_FS
---help---
A user-space daemon, acpi, typically read /proc/acpi/event
and handled all ACPI sub-system generated events.
These events are now delivered to user-space via
either the input layer, or as netlink events.
This build option enables the old code for for legacy
user-space implementation. After some time, this will
be moved under CONFIG_ACPI_PROCFS, and then deleted.
config ACPI_AC
config ACPI_AC
tristate "AC Adapter"
tristate "AC Adapter"
depends on X86
depends on X86
...
...
drivers/acpi/ac.c
浏览文件 @
25c87f7f
...
@@ -204,7 +204,10 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
...
@@ -204,7 +204,10 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
case
ACPI_NOTIFY_BUS_CHECK
:
case
ACPI_NOTIFY_BUS_CHECK
:
case
ACPI_NOTIFY_DEVICE_CHECK
:
case
ACPI_NOTIFY_DEVICE_CHECK
:
acpi_ac_get_state
(
ac
);
acpi_ac_get_state
(
ac
);
acpi_bus_generate_event
(
device
,
event
,
(
u32
)
ac
->
state
);
acpi_bus_generate_proc_event
(
device
,
event
,
(
u32
)
ac
->
state
);
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
(
u32
)
ac
->
state
);
break
;
break
;
default:
default:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
...
...
drivers/acpi/asus_acpi.c
浏览文件 @
25c87f7f
...
@@ -1069,7 +1069,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
...
@@ -1069,7 +1069,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
hotk
->
brightness
=
(
event
&
~
((
u32
)
BR_DOWN
));
hotk
->
brightness
=
(
event
&
~
((
u32
)
BR_DOWN
));
}
}
acpi_bus_generate_event
(
hotk
->
device
,
event
,
acpi_bus_generate_
proc_
event
(
hotk
->
device
,
event
,
hotk
->
event_count
[
event
%
128
]
++
);
hotk
->
event_count
[
event
%
128
]
++
);
return
;
return
;
...
...
drivers/acpi/battery.c
浏览文件 @
25c87f7f
...
@@ -872,8 +872,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
...
@@ -872,8 +872,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
case
ACPI_NOTIFY_DEVICE_CHECK
:
case
ACPI_NOTIFY_DEVICE_CHECK
:
device
=
battery
->
device
;
device
=
battery
->
device
;
acpi_battery_notify_update
(
battery
);
acpi_battery_notify_update
(
battery
);
acpi_bus_generate_event
(
device
,
event
,
acpi_bus_generate_
proc_
event
(
device
,
event
,
acpi_battery_present
(
battery
));
acpi_battery_present
(
battery
));
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
acpi_battery_present
(
battery
));
break
;
break
;
default:
default:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
...
...
drivers/acpi/bus.c
浏览文件 @
25c87f7f
...
@@ -276,6 +276,7 @@ EXPORT_SYMBOL(acpi_bus_set_power);
...
@@ -276,6 +276,7 @@ EXPORT_SYMBOL(acpi_bus_set_power);
Event Management
Event Management
-------------------------------------------------------------------------- */
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI_PROC_EVENT
static
DEFINE_SPINLOCK
(
acpi_bus_event_lock
);
static
DEFINE_SPINLOCK
(
acpi_bus_event_lock
);
LIST_HEAD
(
acpi_bus_event_list
);
LIST_HEAD
(
acpi_bus_event_list
);
...
@@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
...
@@ -283,7 +284,7 @@ DECLARE_WAIT_QUEUE_HEAD(acpi_bus_event_queue);
extern
int
event_is_open
;
extern
int
event_is_open
;
int
acpi_bus_generate_event
(
struct
acpi_device
*
device
,
u8
type
,
int
data
)
int
acpi_bus_generate_
proc_
event
(
struct
acpi_device
*
device
,
u8
type
,
int
data
)
{
{
struct
acpi_bus_event
*
event
=
NULL
;
struct
acpi_bus_event
*
event
=
NULL
;
unsigned
long
flags
=
0
;
unsigned
long
flags
=
0
;
...
@@ -292,10 +293,6 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
...
@@ -292,10 +293,6 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
if
(
!
device
)
if
(
!
device
)
return
-
EINVAL
;
return
-
EINVAL
;
if
(
acpi_bus_generate_genetlink_event
(
device
,
type
,
data
))
printk
(
KERN_WARNING
PREFIX
"Failed to generate an ACPI event via genetlink!
\n
"
);
/* drop event on the floor if no one's listening */
/* drop event on the floor if no one's listening */
if
(
!
event_is_open
)
if
(
!
event_is_open
)
return
0
;
return
0
;
...
@@ -318,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
...
@@ -318,7 +315,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
return
0
;
return
0
;
}
}
EXPORT_SYMBOL
(
acpi_bus_generate_event
);
EXPORT_SYMBOL
(
acpi_bus_generate_
proc_
event
);
int
acpi_bus_receive_event
(
struct
acpi_bus_event
*
event
)
int
acpi_bus_receive_event
(
struct
acpi_bus_event
*
event
)
{
{
...
@@ -364,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
...
@@ -364,6 +361,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
}
}
EXPORT_SYMBOL
(
acpi_bus_receive_event
);
EXPORT_SYMBOL
(
acpi_bus_receive_event
);
#endif
/* CONFIG_ACPI_PROC_EVENT */
/* --------------------------------------------------------------------------
/* --------------------------------------------------------------------------
Notification Handling
Notification Handling
...
...
drivers/acpi/button.c
浏览文件 @
25c87f7f
...
@@ -284,7 +284,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
...
@@ -284,7 +284,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
}
}
input_sync
(
input
);
input_sync
(
input
);
acpi_bus_generate_event
(
button
->
device
,
event
,
acpi_bus_generate_
proc_
event
(
button
->
device
,
event
,
++
button
->
pushed
);
++
button
->
pushed
);
break
;
break
;
default:
default:
...
...
drivers/acpi/event.c
浏览文件 @
25c87f7f
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
#define _COMPONENT ACPI_SYSTEM_COMPONENT
#define _COMPONENT ACPI_SYSTEM_COMPONENT
ACPI_MODULE_NAME
(
"event"
);
ACPI_MODULE_NAME
(
"event"
);
#ifdef CONFIG_ACPI_PROC_EVENT
/* Global vars for handling event proc entry */
/* Global vars for handling event proc entry */
static
DEFINE_SPINLOCK
(
acpi_system_event_lock
);
static
DEFINE_SPINLOCK
(
acpi_system_event_lock
);
int
event_is_open
=
0
;
int
event_is_open
=
0
;
...
@@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = {
...
@@ -106,6 +107,7 @@ static const struct file_operations acpi_system_event_ops = {
.
release
=
acpi_system_close_event
,
.
release
=
acpi_system_close_event
,
.
poll
=
acpi_system_poll_event
,
.
poll
=
acpi_system_poll_event
,
};
};
#endif
/* CONFIG_ACPI_PROC_EVENT */
#ifdef CONFIG_NET
#ifdef CONFIG_NET
static
unsigned
int
acpi_event_seqnum
;
static
unsigned
int
acpi_event_seqnum
;
...
@@ -147,7 +149,8 @@ static struct genl_multicast_group acpi_event_mcgrp = {
...
@@ -147,7 +149,8 @@ static struct genl_multicast_group acpi_event_mcgrp = {
.
name
=
ACPI_GENL_MCAST_GROUP_NAME
,
.
name
=
ACPI_GENL_MCAST_GROUP_NAME
,
};
};
int
acpi_bus_generate_genetlink_event
(
struct
acpi_device
*
device
,
int
acpi_bus_generate_netlink_event
(
const
char
*
device_class
,
const
char
*
bus_id
,
u8
type
,
int
data
)
u8
type
,
int
data
)
{
{
struct
sk_buff
*
skb
;
struct
sk_buff
*
skb
;
...
@@ -191,8 +194,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
...
@@ -191,8 +194,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
memset
(
event
,
0
,
sizeof
(
struct
acpi_genl_event
));
memset
(
event
,
0
,
sizeof
(
struct
acpi_genl_event
));
strcpy
(
event
->
device_class
,
device
->
pnp
.
device
_class
);
strcpy
(
event
->
device_class
,
device_class
);
strcpy
(
event
->
bus_id
,
device
->
dev
.
bus_id
);
strcpy
(
event
->
bus_id
,
bus_id
);
event
->
type
=
type
;
event
->
type
=
type
;
event
->
data
=
data
;
event
->
data
=
data
;
...
@@ -211,6 +214,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
...
@@ -211,6 +214,8 @@ int acpi_bus_generate_genetlink_event(struct acpi_device *device,
return
0
;
return
0
;
}
}
EXPORT_SYMBOL
(
acpi_bus_generate_netlink_event
);
static
int
acpi_event_genetlink_init
(
void
)
static
int
acpi_event_genetlink_init
(
void
)
{
{
int
result
;
int
result
;
...
@@ -228,12 +233,15 @@ static int acpi_event_genetlink_init(void)
...
@@ -228,12 +233,15 @@ static int acpi_event_genetlink_init(void)
}
}
#else
#else
int
acpi_bus_generate_genetlink_event
(
struct
acpi_device
*
device
,
u8
type
,
int
acpi_bus_generate_netlink_event
(
const
char
*
device_class
,
int
data
)
const
char
*
bus_id
,
u8
type
,
int
data
)
{
{
return
0
;
return
0
;
}
}
EXPORT_SYMBOL
(
acpi_generate_netlink_event
);
static
int
acpi_event_genetlink_init
(
void
)
static
int
acpi_event_genetlink_init
(
void
)
{
{
return
-
ENODEV
;
return
-
ENODEV
;
...
@@ -242,7 +250,9 @@ static int acpi_event_genetlink_init(void)
...
@@ -242,7 +250,9 @@ static int acpi_event_genetlink_init(void)
static
int
__init
acpi_event_init
(
void
)
static
int
__init
acpi_event_init
(
void
)
{
{
#ifdef CONFIG_ACPI_PROC_EVENT
struct
proc_dir_entry
*
entry
;
struct
proc_dir_entry
*
entry
;
#endif
int
error
=
0
;
int
error
=
0
;
if
(
acpi_disabled
)
if
(
acpi_disabled
)
...
@@ -254,12 +264,14 @@ static int __init acpi_event_init(void)
...
@@ -254,12 +264,14 @@ static int __init acpi_event_init(void)
printk
(
KERN_WARNING
PREFIX
printk
(
KERN_WARNING
PREFIX
"Failed to create genetlink family for ACPI event
\n
"
);
"Failed to create genetlink family for ACPI event
\n
"
);
#ifdef CONFIG_ACPI_PROC_EVENT
/* 'event' [R] */
/* 'event' [R] */
entry
=
create_proc_entry
(
"event"
,
S_IRUSR
,
acpi_root_dir
);
entry
=
create_proc_entry
(
"event"
,
S_IRUSR
,
acpi_root_dir
);
if
(
entry
)
if
(
entry
)
entry
->
proc_fops
=
&
acpi_system_event_ops
;
entry
->
proc_fops
=
&
acpi_system_event_ops
;
else
else
return
-
ENODEV
;
return
-
ENODEV
;
#endif
return
0
;
return
0
;
}
}
...
...
drivers/acpi/processor_core.c
浏览文件 @
25c87f7f
...
@@ -698,16 +698,23 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
...
@@ -698,16 +698,23 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
switch
(
event
)
{
switch
(
event
)
{
case
ACPI_PROCESSOR_NOTIFY_PERFORMANCE
:
case
ACPI_PROCESSOR_NOTIFY_PERFORMANCE
:
acpi_processor_ppc_has_changed
(
pr
);
acpi_processor_ppc_has_changed
(
pr
);
acpi_bus_generate_event
(
device
,
event
,
acpi_bus_generate_
proc_
event
(
device
,
event
,
pr
->
performance_platform_limit
);
pr
->
performance_platform_limit
);
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
pr
->
performance_platform_limit
);
break
;
break
;
case
ACPI_PROCESSOR_NOTIFY_POWER
:
case
ACPI_PROCESSOR_NOTIFY_POWER
:
acpi_processor_cst_has_changed
(
pr
);
acpi_processor_cst_has_changed
(
pr
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_proc_event
(
device
,
event
,
0
);
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
0
);
break
;
break
;
case
ACPI_PROCESSOR_NOTIFY_THROTTLING
:
case
ACPI_PROCESSOR_NOTIFY_THROTTLING
:
acpi_processor_tstate_has_changed
(
pr
);
acpi_processor_tstate_has_changed
(
pr
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_proc_event
(
device
,
event
,
0
);
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
0
);
default:
default:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Unsupported event [0x%x]
\n
"
,
event
));
"Unsupported event [0x%x]
\n
"
,
event
));
...
...
drivers/acpi/sbs.c
浏览文件 @
25c87f7f
...
@@ -440,11 +440,12 @@ static int acpi_sbs_generate_event(struct acpi_device *device,
...
@@ -440,11 +440,12 @@ static int acpi_sbs_generate_event(struct acpi_device *device,
strcpy
(
acpi_device_bid
(
device
),
bid
);
strcpy
(
acpi_device_bid
(
device
),
bid
);
strcpy
(
acpi_device_class
(
device
),
class
);
strcpy
(
acpi_device_class
(
device
),
class
);
result
=
acpi_bus_generate_event
(
device
,
event
,
state
);
result
=
acpi_bus_generate_
proc_
event
(
device
,
event
,
state
);
strcpy
(
acpi_device_bid
(
device
),
bid_saved
);
strcpy
(
acpi_device_bid
(
device
),
bid_saved
);
strcpy
(
acpi_device_class
(
device
),
class_saved
);
strcpy
(
acpi_device_class
(
device
),
class_saved
);
acpi_bus_generate_netlink_event
(
class
,
bid
,
event
,
state
);
return
result
;
return
result
;
}
}
...
...
drivers/acpi/thermal.c
浏览文件 @
25c87f7f
...
@@ -503,8 +503,12 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
...
@@ -503,8 +503,12 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
printk
(
KERN_EMERG
printk
(
KERN_EMERG
"Critical temperature reached (%ld C), shutting down.
\n
"
,
"Critical temperature reached (%ld C), shutting down.
\n
"
,
KELVIN_TO_CELSIUS
(
tz
->
temperature
));
KELVIN_TO_CELSIUS
(
tz
->
temperature
));
acpi_bus_generate_event
(
tz
->
device
,
ACPI_THERMAL_NOTIFY_CRITICAL
,
acpi_bus_generate_
proc_
event
(
tz
->
device
,
ACPI_THERMAL_NOTIFY_CRITICAL
,
tz
->
trips
.
critical
.
flags
.
enabled
);
tz
->
trips
.
critical
.
flags
.
enabled
);
acpi_bus_generate_netlink_event
(
tz
->
device
->
pnp
.
device_class
,
tz
->
device
->
dev
.
bus_id
,
ACPI_THERMAL_NOTIFY_CRITICAL
,
tz
->
trips
.
critical
.
flags
.
enabled
);
orderly_poweroff
(
true
);
orderly_poweroff
(
true
);
...
@@ -522,8 +526,12 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
...
@@ -522,8 +526,12 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
}
else
if
(
tz
->
trips
.
hot
.
flags
.
enabled
)
}
else
if
(
tz
->
trips
.
hot
.
flags
.
enabled
)
tz
->
trips
.
hot
.
flags
.
enabled
=
0
;
tz
->
trips
.
hot
.
flags
.
enabled
=
0
;
acpi_bus_generate_event
(
tz
->
device
,
ACPI_THERMAL_NOTIFY_HOT
,
acpi_bus_generate_
proc_
event
(
tz
->
device
,
ACPI_THERMAL_NOTIFY_HOT
,
tz
->
trips
.
hot
.
flags
.
enabled
);
tz
->
trips
.
hot
.
flags
.
enabled
);
acpi_bus_generate_netlink_event
(
tz
->
device
->
pnp
.
device_class
,
tz
->
device
->
dev
.
bus_id
,
ACPI_THERMAL_NOTIFY_HOT
,
tz
->
trips
.
hot
.
flags
.
enabled
);
/* TBD: Call user-mode "sleep(S4)" function */
/* TBD: Call user-mode "sleep(S4)" function */
...
@@ -1167,12 +1175,16 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
...
@@ -1167,12 +1175,16 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
case
ACPI_THERMAL_NOTIFY_THRESHOLDS
:
case
ACPI_THERMAL_NOTIFY_THRESHOLDS
:
acpi_thermal_get_trip_points
(
tz
);
acpi_thermal_get_trip_points
(
tz
);
acpi_thermal_check
(
tz
);
acpi_thermal_check
(
tz
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_proc_event
(
device
,
event
,
0
);
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
0
);
break
;
break
;
case
ACPI_THERMAL_NOTIFY_DEVICES
:
case
ACPI_THERMAL_NOTIFY_DEVICES
:
if
(
tz
->
flags
.
devices
)
if
(
tz
->
flags
.
devices
)
acpi_thermal_get_devices
(
tz
);
acpi_thermal_get_devices
(
tz
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_proc_event
(
device
,
event
,
0
);
acpi_bus_generate_netlink_event
(
device
->
pnp
.
device_class
,
device
->
dev
.
bus_id
,
event
,
0
);
break
;
break
;
default:
default:
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
...
...
drivers/acpi/video.c
浏览文件 @
25c87f7f
...
@@ -1781,7 +1781,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
...
@@ -1781,7 +1781,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
switch
(
event
)
{
switch
(
event
)
{
case
ACPI_VIDEO_NOTIFY_SWITCH
:
/* User requested a switch,
case
ACPI_VIDEO_NOTIFY_SWITCH
:
/* User requested a switch,
* most likely via hotkey. */
* most likely via hotkey. */
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_SWITCHVIDEOMODE
;
keycode
=
KEY_SWITCHVIDEOMODE
;
break
;
break
;
...
@@ -1790,23 +1790,23 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
...
@@ -1790,23 +1790,23 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
acpi_video_device_enumerate
(
video
);
acpi_video_device_enumerate
(
video
);
acpi_video_device_rebind
(
video
);
acpi_video_device_rebind
(
video
);
acpi_video_switch_output
(
video
,
event
);
acpi_video_switch_output
(
video
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_SWITCHVIDEOMODE
;
keycode
=
KEY_SWITCHVIDEOMODE
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_CYCLE
:
/* Cycle Display output hotkey pressed. */
case
ACPI_VIDEO_NOTIFY_CYCLE
:
/* Cycle Display output hotkey pressed. */
acpi_video_switch_output
(
video
,
event
);
acpi_video_switch_output
(
video
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_SWITCHVIDEOMODE
;
keycode
=
KEY_SWITCHVIDEOMODE
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_NEXT_OUTPUT
:
/* Next Display output hotkey pressed. */
case
ACPI_VIDEO_NOTIFY_NEXT_OUTPUT
:
/* Next Display output hotkey pressed. */
acpi_video_switch_output
(
video
,
event
);
acpi_video_switch_output
(
video
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_VIDEO_NEXT
;
keycode
=
KEY_VIDEO_NEXT
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_PREV_OUTPUT
:
/* previous Display output hotkey pressed. */
case
ACPI_VIDEO_NOTIFY_PREV_OUTPUT
:
/* previous Display output hotkey pressed. */
acpi_video_switch_output
(
video
,
event
);
acpi_video_switch_output
(
video
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_VIDEO_PREV
;
keycode
=
KEY_VIDEO_PREV
;
break
;
break
;
...
@@ -1843,27 +1843,27 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
...
@@ -1843,27 +1843,27 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
switch
(
event
)
{
switch
(
event
)
{
case
ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS
:
/* Cycle brightness */
case
ACPI_VIDEO_NOTIFY_CYCLE_BRIGHTNESS
:
/* Cycle brightness */
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_BRIGHTNESS_CYCLE
;
keycode
=
KEY_BRIGHTNESS_CYCLE
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS
:
/* Increase brightness */
case
ACPI_VIDEO_NOTIFY_INC_BRIGHTNESS
:
/* Increase brightness */
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_BRIGHTNESSUP
;
keycode
=
KEY_BRIGHTNESSUP
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS
:
/* Decrease brightness */
case
ACPI_VIDEO_NOTIFY_DEC_BRIGHTNESS
:
/* Decrease brightness */
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_BRIGHTNESSDOWN
;
keycode
=
KEY_BRIGHTNESSDOWN
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS
:
/* zero brightnesss */
case
ACPI_VIDEO_NOTIFY_ZERO_BRIGHTNESS
:
/* zero brightnesss */
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_BRIGHTNESS_ZERO
;
keycode
=
KEY_BRIGHTNESS_ZERO
;
break
;
break
;
case
ACPI_VIDEO_NOTIFY_DISPLAY_OFF
:
/* display device off */
case
ACPI_VIDEO_NOTIFY_DISPLAY_OFF
:
/* display device off */
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_video_switch_brightness
(
video_device
,
event
);
acpi_bus_generate_event
(
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
device
,
event
,
0
);
keycode
=
KEY_DISPLAY_OFF
;
keycode
=
KEY_DISPLAY_OFF
;
break
;
break
;
default:
default:
...
...
drivers/char/sonypi.c
浏览文件 @
25c87f7f
...
@@ -875,7 +875,7 @@ static irqreturn_t sonypi_irq(int irq, void *dev_id)
...
@@ -875,7 +875,7 @@ static irqreturn_t sonypi_irq(int irq, void *dev_id)
#ifdef CONFIG_ACPI
#ifdef CONFIG_ACPI
if
(
sonypi_acpi_device
)
if
(
sonypi_acpi_device
)
acpi_bus_generate_event
(
sonypi_acpi_device
,
1
,
event
);
acpi_bus_generate_
proc_
event
(
sonypi_acpi_device
,
1
,
event
);
#endif
#endif
kfifo_put
(
sonypi_device
.
fifo
,
(
unsigned
char
*
)
&
event
,
sizeof
(
event
));
kfifo_put
(
sonypi_device
.
fifo
,
(
unsigned
char
*
)
&
event
,
sizeof
(
event
));
...
...
drivers/misc/asus-laptop.c
浏览文件 @
25c87f7f
...
@@ -732,7 +732,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
...
@@ -732,7 +732,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data)
lcd_blank
(
FB_BLANK_POWERDOWN
);
lcd_blank
(
FB_BLANK_POWERDOWN
);
}
}
acpi_bus_generate_event
(
hotk
->
device
,
event
,
acpi_bus_generate_
proc_
event
(
hotk
->
device
,
event
,
hotk
->
event_count
[
event
%
128
]
++
);
hotk
->
event_count
[
event
%
128
]
++
);
return
;
return
;
...
...
drivers/misc/sony-laptop.c
浏览文件 @
25c87f7f
...
@@ -913,7 +913,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
...
@@ -913,7 +913,7 @@ static void sony_acpi_notify(acpi_handle handle, u32 event, void *data)
dprintk
(
"sony_acpi_notify, event: 0x%.2x
\n
"
,
ev
);
dprintk
(
"sony_acpi_notify, event: 0x%.2x
\n
"
,
ev
);
sony_laptop_report_input_event
(
ev
);
sony_laptop_report_input_event
(
ev
);
acpi_bus_generate_event
(
sony_nc_acpi_device
,
1
,
ev
);
acpi_bus_generate_
proc_
event
(
sony_nc_acpi_device
,
1
,
ev
);
}
}
static
acpi_status
sony_walk_callback
(
acpi_handle
handle
,
u32
level
,
static
acpi_status
sony_walk_callback
(
acpi_handle
handle
,
u32
level
,
...
@@ -2301,7 +2301,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
...
@@ -2301,7 +2301,7 @@ static irqreturn_t sony_pic_irq(int irq, void *dev_id)
found:
found:
sony_laptop_report_input_event
(
device_event
);
sony_laptop_report_input_event
(
device_event
);
acpi_bus_generate_event
(
spic_dev
.
acpi_dev
,
1
,
device_event
);
acpi_bus_generate_
proc_
event
(
spic_dev
.
acpi_dev
,
1
,
device_event
);
sonypi_compat_report_event
(
device_event
);
sonypi_compat_report_event
(
device_event
);
return
IRQ_HANDLED
;
return
IRQ_HANDLED
;
...
...
drivers/misc/thinkpad_acpi.c
浏览文件 @
25c87f7f
...
@@ -1190,10 +1190,10 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
...
@@ -1190,10 +1190,10 @@ static void hotkey_notify(struct ibm_struct *ibm, u32 event)
}
}
if
(
sendacpi
)
if
(
sendacpi
)
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
hkey
);
acpi_bus_generate_
proc_
event
(
ibm
->
acpi
->
device
,
event
,
hkey
);
}
else
{
}
else
{
printk
(
IBM_ERR
"unknown hotkey notification event %d
\n
"
,
event
);
printk
(
IBM_ERR
"unknown hotkey notification event %d
\n
"
,
event
);
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
0
);
acpi_bus_generate_
proc_
event
(
ibm
->
acpi
->
device
,
event
,
0
);
}
}
}
}
...
@@ -2162,22 +2162,27 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
...
@@ -2162,22 +2162,27 @@ static void dock_notify(struct ibm_struct *ibm, u32 event)
int
docked
=
dock_docked
();
int
docked
=
dock_docked
();
int
pci
=
ibm
->
acpi
->
hid
&&
ibm
->
acpi
->
device
&&
int
pci
=
ibm
->
acpi
->
hid
&&
ibm
->
acpi
->
device
&&
acpi_match_device_ids
(
ibm
->
acpi
->
device
,
ibm_pci_device_ids
);
acpi_match_device_ids
(
ibm
->
acpi
->
device
,
ibm_pci_device_ids
);
int
data
;
if
(
event
==
1
&&
!
pci
)
/* 570 */
if
(
event
==
1
&&
!
pci
)
/* 570 */
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
1
)
;
/* button */
data
=
1
;
/* button */
else
if
(
event
==
1
&&
pci
)
/* 570 */
else
if
(
event
==
1
&&
pci
)
/* 570 */
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
3
)
;
/* dock */
data
=
3
;
/* dock */
else
if
(
event
==
3
&&
docked
)
else
if
(
event
==
3
&&
docked
)
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
1
)
;
/* button */
data
=
1
;
/* button */
else
if
(
event
==
3
&&
!
docked
)
else
if
(
event
==
3
&&
!
docked
)
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
2
)
;
/* undock */
data
=
2
;
/* undock */
else
if
(
event
==
0
&&
docked
)
else
if
(
event
==
0
&&
docked
)
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
3
)
;
/* dock */
data
=
3
;
/* dock */
else
{
else
{
printk
(
IBM_ERR
"unknown dock event %d, status %d
\n
"
,
printk
(
IBM_ERR
"unknown dock event %d, status %d
\n
"
,
event
,
_sta
(
dock_handle
));
event
,
_sta
(
dock_handle
));
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
0
)
;
/* unknown */
data
=
0
;
/* unknown */
}
}
acpi_bus_generate_proc_event
(
ibm
->
acpi
->
device
,
event
,
data
);
acpi_bus_generate_netlink_event
(
ibm
->
acpi
->
device
->
pnp
.
device_class
,
ibm
->
acpi
->
device
->
dev
.
bus_id
,
event
,
data
);
}
}
static
int
dock_read
(
char
*
p
)
static
int
dock_read
(
char
*
p
)
...
@@ -2275,7 +2280,10 @@ static int __init bay_init(struct ibm_init_struct *iibm)
...
@@ -2275,7 +2280,10 @@ static int __init bay_init(struct ibm_init_struct *iibm)
static
void
bay_notify
(
struct
ibm_struct
*
ibm
,
u32
event
)
static
void
bay_notify
(
struct
ibm_struct
*
ibm
,
u32
event
)
{
{
acpi_bus_generate_event
(
ibm
->
acpi
->
device
,
event
,
0
);
acpi_bus_generate_proc_event
(
ibm
->
acpi
->
device
,
event
,
0
);
acpi_bus_generate_netlink_event
(
ibm
->
acpi
->
device
->
pnp
.
device_class
,
ibm
->
acpi
->
device
->
dev
.
bus_id
,
event
,
0
);
}
}
#define bay_occupied(b) (_sta(b##_handle) & 1)
#define bay_occupied(b) (_sta(b##_handle) & 1)
...
...
drivers/pci/hotplug/acpiphp_ibm.c
浏览文件 @
25c87f7f
...
@@ -267,7 +267,10 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
...
@@ -267,7 +267,10 @@ static void ibm_handle_events(acpi_handle handle, u32 event, void *context)
if
(
subevent
==
0x80
)
{
if
(
subevent
==
0x80
)
{
dbg
(
"%s: generationg bus event
\n
"
,
__FUNCTION__
);
dbg
(
"%s: generationg bus event
\n
"
,
__FUNCTION__
);
acpi_bus_generate_event
(
note
->
device
,
note
->
event
,
detail
);
acpi_bus_generate_proc_event
(
note
->
device
,
note
->
event
,
detail
);
acpi_bus_generate_netlink_event
(
note
->
device
->
pnp
.
device_class
,
note
->
device
->
dev
.
bus_id
,
note
->
event
,
detail
);
}
else
}
else
note
->
event
=
event
;
note
->
event
=
event
;
}
}
...
...
include/acpi/acpi_bus.h
浏览文件 @
25c87f7f
...
@@ -321,8 +321,7 @@ struct acpi_bus_event {
...
@@ -321,8 +321,7 @@ struct acpi_bus_event {
};
};
extern
struct
kset
acpi_subsys
;
extern
struct
kset
acpi_subsys
;
extern
int
acpi_bus_generate_genetlink_event
(
struct
acpi_device
*
device
,
extern
int
acpi_bus_generate_netlink_event
(
const
char
*
,
const
char
*
,
u8
,
int
);
u8
type
,
int
data
);
/*
/*
* External Functions
* External Functions
*/
*/
...
@@ -332,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
...
@@ -332,8 +331,13 @@ void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
);
int
acpi_bus_get_status
(
struct
acpi_device
*
device
);
int
acpi_bus_get_power
(
acpi_handle
handle
,
int
*
state
);
int
acpi_bus_get_power
(
acpi_handle
handle
,
int
*
state
);
int
acpi_bus_set_power
(
acpi_handle
handle
,
int
state
);
int
acpi_bus_set_power
(
acpi_handle
handle
,
int
state
);
int
acpi_bus_generate_event
(
struct
acpi_device
*
device
,
u8
type
,
int
data
);
#ifdef CONFIG_ACPI_PROC_EVENT
int
acpi_bus_generate_proc_event
(
struct
acpi_device
*
device
,
u8
type
,
int
data
);
int
acpi_bus_receive_event
(
struct
acpi_bus_event
*
event
);
int
acpi_bus_receive_event
(
struct
acpi_bus_event
*
event
);
#else
static
inline
int
acpi_bus_generate_proc_event
(
struct
acpi_device
*
device
,
u8
type
,
int
data
)
{
return
0
;
}
#endif
int
acpi_bus_register_driver
(
struct
acpi_driver
*
driver
);
int
acpi_bus_register_driver
(
struct
acpi_driver
*
driver
);
void
acpi_bus_unregister_driver
(
struct
acpi_driver
*
driver
);
void
acpi_bus_unregister_driver
(
struct
acpi_driver
*
driver
);
int
acpi_bus_add
(
struct
acpi_device
**
child
,
struct
acpi_device
*
parent
,
int
acpi_bus_add
(
struct
acpi_device
**
child
,
struct
acpi_device
*
parent
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录