Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
9443d7c9
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看板
提交
9443d7c9
编写于
10月 14, 2006
作者:
L
Len Brown
浏览文件
操作
浏览文件
下载
差异文件
Pull asus into test branch
上级
aeb11048
6df05702
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
37 addition
and
30 deletion
+37
-30
drivers/acpi/asus_acpi.c
drivers/acpi/asus_acpi.c
+37
-30
未找到文件。
drivers/acpi/asus_acpi.c
浏览文件 @
9443d7c9
...
...
@@ -138,6 +138,7 @@ struct asus_hotk {
S2x
,
//S200 (J1 reported), Victor MP-XP7210
W1N
,
//W1000N
W5A
,
//W5A
W3V
,
//W3030V
xxN
,
//M2400N, M3700N, M5200N, M6800N, S1300N, S5200N
//(Centrino)
END_MODEL
...
...
@@ -375,6 +376,17 @@ static struct model_data model_conf[END_MODEL] = {
.
display_set
=
"SDSP"
,
.
display_get
=
"
\\
ADVG"
},
{
.
name
=
"W3V"
,
.
mt_mled
=
"MLED"
,
.
mt_wled
=
"WLED"
,
.
mt_lcd_switch
=
xxN_PREFIX
"_Q10"
,
.
lcd_status
=
"
\\
BKLT"
,
.
brightness_set
=
"SPLV"
,
.
brightness_get
=
"GPLV"
,
.
display_set
=
"SDSP"
,
.
display_get
=
"
\\
INFB"
},
{
.
name
=
"xxN"
,
.
mt_mled
=
"MLED"
,
...
...
@@ -555,11 +567,11 @@ static int
write_led
(
const
char
__user
*
buffer
,
unsigned
long
count
,
char
*
ledname
,
int
ledmask
,
int
invert
)
{
int
value
;
int
rv
,
value
;
int
led_out
=
0
;
count
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
count
>
0
)
rv
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
rv
>
0
)
led_out
=
value
?
1
:
0
;
hotk
->
status
=
...
...
@@ -572,7 +584,7 @@ write_led(const char __user * buffer, unsigned long count,
printk
(
KERN_WARNING
"Asus ACPI: LED (%s) write failed
\n
"
,
ledname
);
return
count
;
return
rv
;
}
/*
...
...
@@ -607,20 +619,18 @@ static int
proc_write_ledd
(
struct
file
*
file
,
const
char
__user
*
buffer
,
unsigned
long
count
,
void
*
data
)
{
int
value
;
int
rv
,
value
;
count
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
count
>
0
)
{
rv
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
rv
>
0
)
{
if
(
!
write_acpi_int
(
hotk
->
handle
,
hotk
->
methods
->
mt_ledd
,
value
,
NULL
))
printk
(
KERN_WARNING
"Asus ACPI: LED display write failed
\n
"
);
else
hotk
->
ledd_status
=
(
u32
)
value
;
}
else
if
(
count
<
0
)
printk
(
KERN_WARNING
"Asus ACPI: Error reading user input
\n
"
);
return
count
;
}
return
rv
;
}
/*
...
...
@@ -761,12 +771,12 @@ static int
proc_write_lcd
(
struct
file
*
file
,
const
char
__user
*
buffer
,
unsigned
long
count
,
void
*
data
)
{
int
value
;
int
rv
,
value
;
count
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
count
>
0
)
rv
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
rv
>
0
)
set_lcd_state
(
value
);
return
count
;
return
rv
;
}
static
int
read_brightness
(
void
)
...
...
@@ -830,18 +840,15 @@ static int
proc_write_brn
(
struct
file
*
file
,
const
char
__user
*
buffer
,
unsigned
long
count
,
void
*
data
)
{
int
value
;
int
rv
,
value
;
count
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
count
>
0
)
{
rv
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
rv
>
0
)
{
value
=
(
0
<
value
)
?
((
15
<
value
)
?
15
:
value
)
:
0
;
/* 0 <= value <= 15 */
set_brightness
(
value
);
}
else
if
(
count
<
0
)
{
printk
(
KERN_WARNING
"Asus ACPI: Error reading user input
\n
"
);
}
return
count
;
return
rv
;
}
static
void
set_display
(
int
value
)
...
...
@@ -880,15 +887,12 @@ static int
proc_write_disp
(
struct
file
*
file
,
const
char
__user
*
buffer
,
unsigned
long
count
,
void
*
data
)
{
int
value
;
int
rv
,
value
;
count
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
count
>
0
)
rv
=
parse_arg
(
buffer
,
count
,
&
value
);
if
(
rv
>
0
)
set_display
(
value
);
else
if
(
count
<
0
)
printk
(
KERN_WARNING
"Asus ACPI: Error reading user input
\n
"
);
return
count
;
return
rv
;
}
typedef
int
(
proc_readfunc
)
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
...
...
@@ -1097,6 +1101,8 @@ static int asus_model_match(char *model)
return
A4G
;
else
if
(
strncmp
(
model
,
"W1N"
,
3
)
==
0
)
return
W1N
;
else
if
(
strncmp
(
model
,
"W3V"
,
3
)
==
0
)
return
W3V
;
else
if
(
strncmp
(
model
,
"W5A"
,
3
)
==
0
)
return
W5A
;
else
...
...
@@ -1200,9 +1206,10 @@ static int asus_hotk_get_info(void)
hotk
->
methods
->
mt_wled
=
NULL
;
/* L5D's WLED is not controlled by ACPI */
else
if
(
strncmp
(
string
,
"M2N"
,
3
)
==
0
||
strncmp
(
string
,
"W3V"
,
3
)
==
0
||
strncmp
(
string
,
"S1N"
,
3
)
==
0
)
hotk
->
methods
->
mt_wled
=
"WLED"
;
/* M2N
and S1N
have a usable WLED */
/* M2N
, S1N and W3V
have a usable WLED */
else
if
(
asus_info
)
{
if
(
strncmp
(
asus_info
->
oem_table_id
,
"L1"
,
2
)
==
0
)
hotk
->
methods
->
mled_status
=
NULL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录