Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
fff251f6
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看板
提交
fff251f6
编写于
4月 05, 2009
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge branches 'bugzilla-12461' and 'bugzilla-9998' into release
上级
3b4dadf0
a5032bfd
34ff4dbc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
8 deletion
+22
-8
drivers/acpi/ec.c
drivers/acpi/ec.c
+22
-8
未找到文件。
drivers/acpi/ec.c
浏览文件 @
fff251f6
...
...
@@ -67,7 +67,7 @@ enum ec_command {
#define ACPI_EC_DELAY 500
/* Wait 500ms max. during EC ops */
#define ACPI_EC_UDELAY_GLK 1000
/* Wait 1ms max. to get global lock */
#define ACPI_EC_
UDELAY 100
/* Wait 100us before polling EC again
*/
#define ACPI_EC_
CDELAY 10
/* Wait 10us before polling EC
*/
#define ACPI_EC_STORM_THRESHOLD 8
/* number of false interrupts
per one transaction */
...
...
@@ -236,13 +236,23 @@ static int ec_check_sci(struct acpi_ec *ec, u8 state)
return
0
;
}
static
void
ec_delay
(
void
)
{
/* EC in MSI notebooks don't tolerate delays other than 550 usec */
if
(
EC_FLAGS_MSI
)
udelay
(
ACPI_EC_DELAY
);
else
/* Use shortest sleep available */
msleep
(
1
);
}
static
int
ec_poll
(
struct
acpi_ec
*
ec
)
{
unsigned
long
delay
=
jiffies
+
msecs_to_jiffies
(
ACPI_EC_DELAY
);
udelay
(
ACPI_EC_
U
DELAY
);
udelay
(
ACPI_EC_
C
DELAY
);
while
(
time_before
(
jiffies
,
delay
))
{
gpe_transaction
(
ec
,
acpi_ec_read_status
(
ec
));
udelay
(
ACPI_EC_UDELAY
);
ec_delay
(
);
if
(
ec_transaction_done
(
ec
))
return
0
;
}
...
...
@@ -755,6 +765,10 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
unsigned
long
long
tmp
=
0
;
struct
acpi_ec
*
ec
=
context
;
/* clear addr values, ec_parse_io_ports depend on it */
ec
->
command_addr
=
ec
->
data_addr
=
0
;
status
=
acpi_walk_resources
(
handle
,
METHOD_NAME__CRS
,
ec_parse_io_ports
,
ec
);
if
(
ACPI_FAILURE
(
status
))
...
...
@@ -804,11 +818,11 @@ static int acpi_ec_add(struct acpi_device *device)
ec
=
make_acpi_ec
();
if
(
!
ec
)
return
-
ENOMEM
;
if
(
ec_parse_device
(
device
->
handle
,
0
,
ec
,
NULL
)
!=
AE_CTRL_TERMINATE
)
{
}
if
(
ec_parse_device
(
device
->
handle
,
0
,
ec
,
NULL
)
!=
AE_CTRL_TERMINATE
)
{
kfree
(
ec
);
return
-
EINVAL
;
}
}
ec
->
handle
=
device
->
handle
;
...
...
@@ -986,12 +1000,12 @@ int __init acpi_ec_ecdt_probe(void)
boot_ec
->
handle
=
ACPI_ROOT_OBJECT
;
acpi_get_handle
(
ACPI_ROOT_OBJECT
,
ecdt_ptr
->
id
,
&
boot_ec
->
handle
);
/* Don't trust ECDT, which comes from ASUSTek */
if
(
!
dmi_name_in_vendors
(
"ASUS"
))
if
(
!
dmi_name_in_vendors
(
"ASUS"
)
&&
EC_FLAGS_MSI
==
0
)
goto
install
;
saved_ec
=
kmalloc
(
sizeof
(
struct
acpi_ec
),
GFP_KERNEL
);
if
(
!
saved_ec
)
return
-
ENOMEM
;
memcpy
(
saved_ec
,
boot_ec
,
sizeof
(
*
saved
_ec
));
memcpy
(
saved_ec
,
boot_ec
,
sizeof
(
struct
acpi
_ec
));
/* fall through */
}
/* This workaround is needed only on some broken machines,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录