Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
97d2ef56
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 4 年多
通知
15
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看板
提交
97d2ef56
编写于
7月 18, 2008
作者:
A
Andi Kleen
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'merge' into release-2.6.27
上级
e1469c34
ea51011a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
75 addition
and
13 deletion
+75
-13
drivers/acpi/pci_link.c
drivers/acpi/pci_link.c
+20
-11
drivers/acpi/thermal.c
drivers/acpi/thermal.c
+43
-0
drivers/acpi/video.c
drivers/acpi/video.c
+12
-2
未找到文件。
drivers/acpi/pci_link.c
浏览文件 @
97d2ef56
...
@@ -113,20 +113,23 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
...
@@ -113,20 +113,23 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
switch
(
resource
->
type
)
{
switch
(
resource
->
type
)
{
case
ACPI_RESOURCE_TYPE_START_DEPENDENT
:
case
ACPI_RESOURCE_TYPE_START_DEPENDENT
:
case
ACPI_RESOURCE_TYPE_END_TAG
:
return
AE_OK
;
return
AE_OK
;
case
ACPI_RESOURCE_TYPE_IRQ
:
case
ACPI_RESOURCE_TYPE_IRQ
:
{
{
struct
acpi_resource_irq
*
p
=
&
resource
->
data
.
irq
;
struct
acpi_resource_irq
*
p
=
&
resource
->
data
.
irq
;
if
(
!
p
||
!
p
->
interrupt_count
)
{
if
(
!
p
||
!
p
->
interrupt_count
)
{
printk
(
KERN_WARNING
PREFIX
"Blank IRQ resource
\n
"
);
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Blank _PRS IRQ resource
\n
"
));
return
AE_OK
;
return
AE_OK
;
}
}
for
(
i
=
0
;
for
(
i
=
0
;
(
i
<
p
->
interrupt_count
(
i
<
p
->
interrupt_count
&&
i
<
ACPI_PCI_LINK_MAX_POSSIBLE
);
i
++
)
{
&&
i
<
ACPI_PCI_LINK_MAX_POSSIBLE
);
i
++
)
{
if
(
!
p
->
interrupts
[
i
])
{
if
(
!
p
->
interrupts
[
i
])
{
printk
(
KERN_WARNING
PREFIX
"Invalid IRQ %d
\n
"
,
printk
(
KERN_WARNING
PREFIX
p
->
interrupts
[
i
]);
"Invalid _PRS IRQ %d
\n
"
,
p
->
interrupts
[
i
]);
continue
;
continue
;
}
}
link
->
irq
.
possible
[
i
]
=
p
->
interrupts
[
i
];
link
->
irq
.
possible
[
i
]
=
p
->
interrupts
[
i
];
...
@@ -143,15 +146,16 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
...
@@ -143,15 +146,16 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
&
resource
->
data
.
extended_irq
;
&
resource
->
data
.
extended_irq
;
if
(
!
p
||
!
p
->
interrupt_count
)
{
if
(
!
p
||
!
p
->
interrupt_count
)
{
printk
(
KERN_WARNING
PREFIX
printk
(
KERN_WARNING
PREFIX
"Blank EXT IRQ resource
\n
"
);
"Blank
_PRS
EXT IRQ resource
\n
"
);
return
AE_OK
;
return
AE_OK
;
}
}
for
(
i
=
0
;
for
(
i
=
0
;
(
i
<
p
->
interrupt_count
(
i
<
p
->
interrupt_count
&&
i
<
ACPI_PCI_LINK_MAX_POSSIBLE
);
i
++
)
{
&&
i
<
ACPI_PCI_LINK_MAX_POSSIBLE
);
i
++
)
{
if
(
!
p
->
interrupts
[
i
])
{
if
(
!
p
->
interrupts
[
i
])
{
printk
(
KERN_WARNING
PREFIX
"Invalid IRQ %d
\n
"
,
printk
(
KERN_WARNING
PREFIX
p
->
interrupts
[
i
]);
"Invalid _PRS IRQ %d
\n
"
,
p
->
interrupts
[
i
]);
continue
;
continue
;
}
}
link
->
irq
.
possible
[
i
]
=
p
->
interrupts
[
i
];
link
->
irq
.
possible
[
i
]
=
p
->
interrupts
[
i
];
...
@@ -163,7 +167,8 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
...
@@ -163,7 +167,8 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
break
;
break
;
}
}
default:
default:
printk
(
KERN_ERR
PREFIX
"Resource is not an IRQ entry
\n
"
);
printk
(
KERN_ERR
PREFIX
"_PRS resource type 0x%x isn't an IRQ
\n
"
,
resource
->
type
);
return
AE_OK
;
return
AE_OK
;
}
}
...
@@ -199,6 +204,9 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
...
@@ -199,6 +204,9 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
switch
(
resource
->
type
)
{
switch
(
resource
->
type
)
{
case
ACPI_RESOURCE_TYPE_START_DEPENDENT
:
case
ACPI_RESOURCE_TYPE_END_TAG
:
return
AE_OK
;
case
ACPI_RESOURCE_TYPE_IRQ
:
case
ACPI_RESOURCE_TYPE_IRQ
:
{
{
struct
acpi_resource_irq
*
p
=
&
resource
->
data
.
irq
;
struct
acpi_resource_irq
*
p
=
&
resource
->
data
.
irq
;
...
@@ -208,7 +216,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
...
@@ -208,7 +216,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
* particularly those those w/ _STA disabled
* particularly those those w/ _STA disabled
*/
*/
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
ACPI_DEBUG_PRINT
((
ACPI_DB_INFO
,
"Blank IRQ resource
\n
"
));
"Blank
_CRS
IRQ resource
\n
"
));
return
AE_OK
;
return
AE_OK
;
}
}
*
irq
=
p
->
interrupts
[
0
];
*
irq
=
p
->
interrupts
[
0
];
...
@@ -224,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
...
@@ -224,7 +232,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
* return at least 1 IRQ
* return at least 1 IRQ
*/
*/
printk
(
KERN_WARNING
PREFIX
printk
(
KERN_WARNING
PREFIX
"Blank EXT IRQ resource
\n
"
);
"Blank
_CRS
EXT IRQ resource
\n
"
);
return
AE_OK
;
return
AE_OK
;
}
}
*
irq
=
p
->
interrupts
[
0
];
*
irq
=
p
->
interrupts
[
0
];
...
@@ -232,10 +240,11 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
...
@@ -232,10 +240,11 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
}
}
break
;
break
;
default:
default:
printk
(
KERN_ERR
PREFIX
"
Resource %d isn't an IRQ
\n
"
,
resource
->
type
);
printk
(
KERN_ERR
PREFIX
"
_CRS resource type 0x%x isn't an IRQ
\n
"
,
case
ACPI_RESOURCE_TYPE_END_TAG
:
resource
->
type
);
return
AE_OK
;
return
AE_OK
;
}
}
return
AE_CTRL_TERMINATE
;
return
AE_CTRL_TERMINATE
;
}
}
...
...
drivers/acpi/thermal.c
浏览文件 @
97d2ef56
...
@@ -769,6 +769,47 @@ static void acpi_thermal_run(unsigned long data)
...
@@ -769,6 +769,47 @@ static void acpi_thermal_run(unsigned long data)
acpi_os_execute
(
OSL_GPE_HANDLER
,
acpi_thermal_check
,
(
void
*
)
data
);
acpi_os_execute
(
OSL_GPE_HANDLER
,
acpi_thermal_check
,
(
void
*
)
data
);
}
}
static
void
acpi_thermal_active_off
(
void
*
data
)
{
int
result
=
0
;
struct
acpi_thermal
*
tz
=
data
;
int
i
=
0
;
int
j
=
0
;
struct
acpi_thermal_active
*
active
=
NULL
;
if
(
!
tz
)
{
printk
(
KERN_ERR
PREFIX
"Invalid (NULL) context
\n
"
);
return
;
}
result
=
acpi_thermal_get_temperature
(
tz
);
if
(
result
)
return
;
for
(
i
=
0
;
i
<
ACPI_THERMAL_MAX_ACTIVE
;
i
++
)
{
active
=
&
(
tz
->
trips
.
active
[
i
]);
if
(
!
active
||
!
active
->
flags
.
valid
)
break
;
if
(
tz
->
temperature
>=
active
->
temperature
)
{
/*
* If the thermal temperature is greater than the
* active threshod, unnecessary to turn off the
* the active cooling device.
*/
continue
;
}
/*
* Below Threshold?
* ----------------
* Turn OFF all cooling devices associated with this
* threshold.
*/
for
(
j
=
0
;
j
<
active
->
devices
.
count
;
j
++
)
result
=
acpi_bus_set_power
(
active
->
devices
.
handles
[
j
],
ACPI_STATE_D3
);
}
}
static
void
acpi_thermal_check
(
void
*
data
)
static
void
acpi_thermal_check
(
void
*
data
)
{
{
int
result
=
0
;
int
result
=
0
;
...
@@ -1624,6 +1665,8 @@ static int acpi_thermal_add(struct acpi_device *device)
...
@@ -1624,6 +1665,8 @@ static int acpi_thermal_add(struct acpi_device *device)
init_timer
(
&
tz
->
timer
);
init_timer
(
&
tz
->
timer
);
acpi_thermal_active_off
(
tz
);
acpi_thermal_check
(
tz
);
acpi_thermal_check
(
tz
);
status
=
acpi_install_notify_handler
(
device
->
handle
,
status
=
acpi_install_notify_handler
(
device
->
handle
,
...
...
drivers/acpi/video.c
浏览文件 @
97d2ef56
...
@@ -741,7 +741,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
...
@@ -741,7 +741,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
max_level
=
acpi_video_init_brightness
(
device
);
max_level
=
acpi_video_init_brightness
(
device
);
if
(
device
->
cap
.
_BCL
&&
device
->
cap
.
_BCM
&&
device
->
cap
.
_BQC
&&
max_level
>
0
)
{
if
(
device
->
cap
.
_BCL
&&
device
->
cap
.
_BCM
&&
max_level
>
0
)
{
int
result
;
int
result
;
static
int
count
=
0
;
static
int
count
=
0
;
char
*
name
;
char
*
name
;
...
@@ -753,7 +753,17 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
...
@@ -753,7 +753,17 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
device
->
backlight
=
backlight_device_register
(
name
,
device
->
backlight
=
backlight_device_register
(
name
,
NULL
,
device
,
&
acpi_backlight_ops
);
NULL
,
device
,
&
acpi_backlight_ops
);
device
->
backlight
->
props
.
max_brightness
=
device
->
brightness
->
count
-
3
;
device
->
backlight
->
props
.
max_brightness
=
device
->
brightness
->
count
-
3
;
device
->
backlight
->
props
.
brightness
=
acpi_video_get_brightness
(
device
->
backlight
);
/*
* If there exists the _BQC object, the _BQC object will be
* called to get the current backlight brightness. Otherwise
* the brightness will be set to the maximum.
*/
if
(
device
->
cap
.
_BQC
)
device
->
backlight
->
props
.
brightness
=
acpi_video_get_brightness
(
device
->
backlight
);
else
device
->
backlight
->
props
.
brightness
=
device
->
backlight
->
props
.
max_brightness
;
backlight_update_status
(
device
->
backlight
);
backlight_update_status
(
device
->
backlight
);
kfree
(
name
);
kfree
(
name
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录