Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
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
Commits
1d5b30fc
Commit
1d5b30fc
authored
Oct 14, 2006
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Pull battery into test branch
parents
c92fd49c
34c4415a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
7 deletions
+27
-7
drivers/acpi/battery.c
drivers/acpi/battery.c
+14
-0
drivers/acpi/sbs.c
drivers/acpi/sbs.c
+13
-7
No files found.
drivers/acpi/battery.c
View file @
1d5b30fc
...
...
@@ -64,6 +64,7 @@ extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir);
static
int
acpi_battery_add
(
struct
acpi_device
*
device
);
static
int
acpi_battery_remove
(
struct
acpi_device
*
device
,
int
type
);
static
int
acpi_battery_resume
(
struct
acpi_device
*
device
,
int
status
);
static
struct
acpi_driver
acpi_battery_driver
=
{
.
name
=
ACPI_BATTERY_DRIVER_NAME
,
...
...
@@ -71,6 +72,7 @@ static struct acpi_driver acpi_battery_driver = {
.
ids
=
ACPI_BATTERY_HID
,
.
ops
=
{
.
add
=
acpi_battery_add
,
.
resume
=
acpi_battery_resume
,
.
remove
=
acpi_battery_remove
,
},
};
...
...
@@ -753,6 +755,18 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
return
0
;
}
/* this is needed to learn about changes made in suspended state */
static
int
acpi_battery_resume
(
struct
acpi_device
*
device
,
int
state
)
{
struct
acpi_battery
*
battery
;
if
(
!
device
)
return
-
EINVAL
;
battery
=
device
->
driver_data
;
return
acpi_battery_check
(
battery
);
}
static
int
__init
acpi_battery_init
(
void
)
{
int
result
;
...
...
drivers/acpi/sbs.c
View file @
1d5b30fc
...
...
@@ -98,11 +98,11 @@ static int update_info_mode = UPDATE_INFO_MODE;
static
int
update_time
=
UPDATE_TIME
;
static
int
update_time2
=
UPDATE_TIME2
;
module_param
(
capacity_mode
,
int
,
CAPACITY_UNIT
);
module_param
(
update_mode
,
int
,
UPDATE_MODE
);
module_param
(
update_info_mode
,
int
,
UPDATE_INFO_MODE
);
module_param
(
update_time
,
int
,
UPDATE_TIME
);
module_param
(
update_time2
,
int
,
UPDATE_TIME2
);
module_param
(
capacity_mode
,
int
,
0
);
module_param
(
update_mode
,
int
,
0
);
module_param
(
update_info_mode
,
int
,
0
);
module_param
(
update_time
,
int
,
0
);
module_param
(
update_time2
,
int
,
0
);
static
int
acpi_sbs_add
(
struct
acpi_device
*
device
);
static
int
acpi_sbs_remove
(
struct
acpi_device
*
device
,
int
type
);
...
...
@@ -1685,10 +1685,16 @@ static int acpi_sbs_add(struct acpi_device *device)
int
acpi_sbs_remove
(
struct
acpi_device
*
device
,
int
type
)
{
struct
acpi_sbs
*
sbs
=
(
struct
acpi_sbs
*
)
acpi_driver_data
(
device
)
;
struct
acpi_sbs
*
sbs
=
NULL
;
int
id
;
if
(
!
device
||
!
sbs
)
{
if
(
!
device
)
{
return
-
EINVAL
;
}
sbs
=
(
struct
acpi_sbs
*
)
acpi_driver_data
(
device
);
if
(
!
sbs
)
{
return
-
EINVAL
;
}
...
...
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