Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
e4151eaa
Commit
e4151eaa
authored
Jun 15, 2006
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull ibm_acpi into release branch
parents
c080a3e6
42adb53c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
0 deletions
+70
-0
drivers/acpi/ibm_acpi.c
drivers/acpi/ibm_acpi.c
+70
-0
No files found.
drivers/acpi/ibm_acpi.c
View file @
e4151eaa
...
...
@@ -567,6 +567,69 @@ static int bluetooth_write(char *buf)
return
0
;
}
static
int
wan_supported
;
static
int
wan_init
(
void
)
{
wan_supported
=
hkey_handle
&&
acpi_evalf
(
hkey_handle
,
NULL
,
"GWAN"
,
"qv"
);
return
0
;
}
static
int
wan_status
(
void
)
{
int
status
;
if
(
!
wan_supported
||
!
acpi_evalf
(
hkey_handle
,
&
status
,
"GWAN"
,
"d"
))
status
=
0
;
return
status
;
}
static
int
wan_read
(
char
*
p
)
{
int
len
=
0
;
int
status
=
wan_status
();
if
(
!
wan_supported
)
len
+=
sprintf
(
p
+
len
,
"status:
\t\t
not supported
\n
"
);
else
if
(
!
(
status
&
1
))
len
+=
sprintf
(
p
+
len
,
"status:
\t\t
not installed
\n
"
);
else
{
len
+=
sprintf
(
p
+
len
,
"status:
\t\t
%s
\n
"
,
enabled
(
status
,
1
));
len
+=
sprintf
(
p
+
len
,
"commands:
\t
enable, disable
\n
"
);
}
return
len
;
}
static
int
wan_write
(
char
*
buf
)
{
int
status
=
wan_status
();
char
*
cmd
;
int
do_cmd
=
0
;
if
(
!
wan_supported
)
return
-
ENODEV
;
while
((
cmd
=
next_cmd
(
&
buf
)))
{
if
(
strlencmp
(
cmd
,
"enable"
)
==
0
)
{
status
|=
2
;
}
else
if
(
strlencmp
(
cmd
,
"disable"
)
==
0
)
{
status
&=
~
2
;
}
else
return
-
EINVAL
;
do_cmd
=
1
;
}
if
(
do_cmd
&&
!
acpi_evalf
(
hkey_handle
,
NULL
,
"SWAN"
,
"vd"
,
status
))
return
-
EIO
;
return
0
;
}
static
int
video_supported
;
static
int
video_orig_autosw
;
...
...
@@ -1562,6 +1625,13 @@ static struct ibm_struct ibms[] = {
.
read
=
bluetooth_read
,
.
write
=
bluetooth_write
,
},
{
.
name
=
"wan"
,
.
init
=
wan_init
,
.
read
=
wan_read
,
.
write
=
wan_write
,
.
experimental
=
1
,
},
{
.
name
=
"video"
,
.
init
=
video_init
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment