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
877c357e
Commit
877c357e
authored
Feb 07, 2008
by
Len Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branches 'release', 'acpi_pm_device_sleep_state' and 'battery' into release
parents
488b5ec8
ad3399c3
7c2670bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
drivers/acpi/battery.c
drivers/acpi/battery.c
+5
-0
drivers/acpi/sleep/main.c
drivers/acpi/sleep/main.c
+12
-3
drivers/power/power_supply_sysfs.c
drivers/power/power_supply_sysfs.c
+1
-0
include/linux/power_supply.h
include/linux/power_supply.h
+1
-0
No files found.
drivers/acpi/battery.c
View file @
877c357e
...
...
@@ -194,6 +194,9 @@ static int acpi_battery_get_property(struct power_supply *psy,
case
POWER_SUPPLY_PROP_MANUFACTURER
:
val
->
strval
=
battery
->
oem_info
;
break
;
case
POWER_SUPPLY_PROP_SERIAL_NUMBER
:
val
->
strval
=
battery
->
serial_number
;
break
;
default:
return
-
EINVAL
;
}
...
...
@@ -212,6 +215,7 @@ static enum power_supply_property charge_battery_props[] = {
POWER_SUPPLY_PROP_CHARGE_NOW
,
POWER_SUPPLY_PROP_MODEL_NAME
,
POWER_SUPPLY_PROP_MANUFACTURER
,
POWER_SUPPLY_PROP_SERIAL_NUMBER
,
};
static
enum
power_supply_property
energy_battery_props
[]
=
{
...
...
@@ -226,6 +230,7 @@ static enum power_supply_property energy_battery_props[] = {
POWER_SUPPLY_PROP_ENERGY_NOW
,
POWER_SUPPLY_PROP_MODEL_NAME
,
POWER_SUPPLY_PROP_MANUFACTURER
,
POWER_SUPPLY_PROP_SERIAL_NUMBER
,
};
#endif
...
...
drivers/acpi/sleep/main.c
View file @
877c357e
...
...
@@ -472,11 +472,20 @@ int acpi_pm_device_sleep_state(struct device *dev, int wake, int *d_min_p)
if
(
acpi_target_sleep_state
==
ACPI_STATE_S0
||
(
wake
&&
adev
->
wakeup
.
state
.
enabled
&&
adev
->
wakeup
.
sleep_state
<=
acpi_target_sleep_state
))
{
acpi_status
status
;
acpi_method
[
3
]
=
'W'
;
acpi_evaluate_integer
(
handle
,
acpi_method
,
NULL
,
&
d_max
);
/* Sanity check */
if
(
d_max
<
d_min
)
status
=
acpi_evaluate_integer
(
handle
,
acpi_method
,
NULL
,
&
d_max
);
if
(
ACPI_FAILURE
(
status
))
{
d_max
=
d_min
;
}
else
if
(
d_max
<
d_min
)
{
/* Warn the user of the broken DSDT */
printk
(
KERN_WARNING
"ACPI: Wrong value from %s
\n
"
,
acpi_method
);
/* Sanitize it */
d_min
=
d_max
;
}
}
if
(
d_min_p
)
...
...
drivers/power/power_supply_sysfs.c
View file @
877c357e
...
...
@@ -116,6 +116,7 @@ static struct device_attribute power_supply_attrs[] = {
/* Properties of type `const char *' */
POWER_SUPPLY_ATTR
(
model_name
),
POWER_SUPPLY_ATTR
(
manufacturer
),
POWER_SUPPLY_ATTR
(
serial_number
),
};
static
ssize_t
power_supply_show_static_attrs
(
struct
device
*
dev
,
...
...
include/linux/power_supply.h
View file @
877c357e
...
...
@@ -94,6 +94,7 @@ enum power_supply_property {
/* Properties of type `const char *' */
POWER_SUPPLY_PROP_MODEL_NAME
,
POWER_SUPPLY_PROP_MANUFACTURER
,
POWER_SUPPLY_PROP_SERIAL_NUMBER
,
};
enum
power_supply_type
{
...
...
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