Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
b43035a5
Commit
b43035a5
authored
Jul 22, 2007
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull sbs into release branch
parents
8269cc4e
addad454
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
26 deletions
+7
-26
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+7
-26
No files found.
drivers/acpi/sbs.c
View file @
b43035a5
...
@@ -127,7 +127,7 @@ static int acpi_sbs_resume(struct acpi_device *device);
...
@@ -127,7 +127,7 @@ static int acpi_sbs_resume(struct acpi_device *device);
static
struct
acpi_driver
acpi_sbs_driver
=
{
static
struct
acpi_driver
acpi_sbs_driver
=
{
.
name
=
"sbs"
,
.
name
=
"sbs"
,
.
class
=
ACPI_SBS_CLASS
,
.
class
=
ACPI_SBS_CLASS
,
.
ids
=
ACPI_SBS_HID
,
.
ids
=
"ACPI0001,ACPI0005"
,
.
ops
=
{
.
ops
=
{
.
add
=
acpi_sbs_add
,
.
add
=
acpi_sbs_add
,
.
remove
=
acpi_sbs_remove
,
.
remove
=
acpi_sbs_remove
,
...
@@ -176,10 +176,8 @@ struct acpi_battery {
...
@@ -176,10 +176,8 @@ struct acpi_battery {
};
};
struct
acpi_sbs
{
struct
acpi_sbs
{
acpi_handle
handle
;
int
base
;
int
base
;
struct
acpi_device
*
device
;
struct
acpi_device
*
device
;
struct
acpi_ec_smbus
*
smbus
;
struct
mutex
mutex
;
struct
mutex
mutex
;
int
sbsm_present
;
int
sbsm_present
;
int
sbsm_batteries_supported
;
int
sbsm_batteries_supported
;
...
@@ -511,7 +509,7 @@ static int acpi_sbsm_get_info(struct acpi_sbs *sbs)
...
@@ -511,7 +509,7 @@ static int acpi_sbsm_get_info(struct acpi_sbs *sbs)
"acpi_sbs_read_word() failed"
));
"acpi_sbs_read_word() failed"
));
goto
end
;
goto
end
;
}
}
sbs
->
sbsm_present
=
1
;
sbs
->
sbsm_batteries_supported
=
battery_system_info
&
0x000f
;
sbs
->
sbsm_batteries_supported
=
battery_system_info
&
0x000f
;
end:
end:
...
@@ -1630,13 +1628,12 @@ static int acpi_sbs_add(struct acpi_device *device)
...
@@ -1630,13 +1628,12 @@ static int acpi_sbs_add(struct acpi_device *device)
{
{
struct
acpi_sbs
*
sbs
=
NULL
;
struct
acpi_sbs
*
sbs
=
NULL
;
int
result
=
0
,
remove_result
=
0
;
int
result
=
0
,
remove_result
=
0
;
unsigned
long
sbs_obj
;
int
id
;
int
id
;
acpi_status
status
=
AE_OK
;
acpi_status
status
=
AE_OK
;
unsigned
long
val
;
unsigned
long
val
;
status
=
status
=
acpi_evaluate_integer
(
device
->
parent
->
handle
,
"_EC"
,
NULL
,
&
val
);
acpi_evaluate_integer
(
device
->
handle
,
"_EC"
,
NULL
,
&
val
);
if
(
ACPI_FAILURE
(
status
))
{
if
(
ACPI_FAILURE
(
status
))
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"Error obtaining _EC"
));
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"Error obtaining _EC"
));
return
-
EIO
;
return
-
EIO
;
...
@@ -1653,7 +1650,7 @@ static int acpi_sbs_add(struct acpi_device *device)
...
@@ -1653,7 +1650,7 @@ static int acpi_sbs_add(struct acpi_device *device)
sbs_mutex_lock
(
sbs
);
sbs_mutex_lock
(
sbs
);
sbs
->
base
=
(
val
&
0xff00ull
)
>>
8
;
sbs
->
base
=
0xff
&
(
val
>>
8
)
;
sbs
->
device
=
device
;
sbs
->
device
=
device
;
strcpy
(
acpi_device_name
(
device
),
ACPI_SBS_DEVICE_NAME
);
strcpy
(
acpi_device_name
(
device
),
ACPI_SBS_DEVICE_NAME
);
...
@@ -1665,24 +1662,10 @@ static int acpi_sbs_add(struct acpi_device *device)
...
@@ -1665,24 +1662,10 @@ static int acpi_sbs_add(struct acpi_device *device)
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"acpi_ac_add() failed"
));
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"acpi_ac_add() failed"
));
goto
end
;
goto
end
;
}
}
status
=
acpi_evaluate_integer
(
device
->
handle
,
"_SBS"
,
NULL
,
&
sbs_obj
);
if
(
status
)
{
ACPI_EXCEPTION
((
AE_INFO
,
status
,
"acpi_evaluate_integer() failed"
));
result
=
-
EIO
;
goto
end
;
}
if
(
sbs_obj
>
0
)
{
result
=
acpi_sbsm_get_info
(
sbs
);
if
(
result
)
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
"acpi_sbsm_get_info() failed"
));
goto
end
;
}
sbs
->
sbsm_present
=
1
;
}
if
(
sbs
->
sbsm_present
==
0
)
{
acpi_sbsm_get_info
(
sbs
);
if
(
!
sbs
->
sbsm_present
)
{
result
=
acpi_battery_add
(
sbs
,
0
);
result
=
acpi_battery_add
(
sbs
,
0
);
if
(
result
)
{
if
(
result
)
{
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
ACPI_EXCEPTION
((
AE_INFO
,
AE_ERROR
,
...
@@ -1702,8 +1685,6 @@ static int acpi_sbs_add(struct acpi_device *device)
...
@@ -1702,8 +1685,6 @@ static int acpi_sbs_add(struct acpi_device *device)
}
}
}
}
sbs
->
handle
=
device
->
handle
;
init_timer
(
&
sbs
->
update_timer
);
init_timer
(
&
sbs
->
update_timer
);
result
=
acpi_check_update_proc
(
sbs
);
result
=
acpi_check_update_proc
(
sbs
);
if
(
result
)
if
(
result
)
...
...
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