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
048f35ff
Commit
048f35ff
authored
Oct 17, 2017
by
Rafael J. Wysocki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'pm-qos' into acpi-pm
parents
eeb2d80d
20f97caf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
59 deletions
+9
-59
Documentation/ABI/testing/sysfs-devices-power
Documentation/ABI/testing/sysfs-devices-power
+0
-16
Documentation/power/pm_qos_interface.txt
Documentation/power/pm_qos_interface.txt
+6
-7
drivers/acpi/device_pm.c
drivers/acpi/device_pm.c
+2
-4
drivers/base/power/domain.c
drivers/base/power/domain.c
+1
-3
drivers/base/power/sysfs.c
drivers/base/power/sysfs.c
+0
-28
include/linux/pm_qos.h
include/linux/pm_qos.h
+0
-1
No files found.
Documentation/ABI/testing/sysfs-devices-power
View file @
048f35ff
...
@@ -258,19 +258,3 @@ Description:
...
@@ -258,19 +258,3 @@ Description:
This attribute has no effect on system-wide suspend/resume and
This attribute has no effect on system-wide suspend/resume and
hibernation.
hibernation.
What: /sys/devices/.../power/pm_qos_remote_wakeup
Date: September 2012
Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
Description:
The /sys/devices/.../power/pm_qos_remote_wakeup attribute
is used for manipulating the PM QoS "remote wakeup required"
flag. If set, this flag indicates to the kernel that the
device is a source of user events that have to be signaled from
its low-power states.
Not all drivers support this attribute. If it isn't supported,
it is not present.
This attribute has no effect on system-wide suspend/resume and
hibernation.
Documentation/power/pm_qos_interface.txt
View file @
048f35ff
...
@@ -98,8 +98,7 @@ Values are updated in response to changes of the request list.
...
@@ -98,8 +98,7 @@ Values are updated in response to changes of the request list.
The target values of resume latency and active state latency tolerance are
The target values of resume latency and active state latency tolerance are
simply the minimum of the request values held in the parameter list elements.
simply the minimum of the request values held in the parameter list elements.
The PM QoS flags aggregate value is a gather (bitwise OR) of all list elements'
The PM QoS flags aggregate value is a gather (bitwise OR) of all list elements'
values. Two device PM QoS flags are defined currently: PM_QOS_FLAG_NO_POWER_OFF
values. One device PM QoS flag is defined currently: PM_QOS_FLAG_NO_POWER_OFF.
and PM_QOS_FLAG_REMOTE_WAKEUP.
Note: The aggregated target values are implemented in such a way that reading
Note: The aggregated target values are implemented in such a way that reading
the aggregated value does not require any locking mechanism.
the aggregated value does not require any locking mechanism.
...
@@ -153,14 +152,14 @@ PM QoS list of resume latency constraints and remove sysfs attribute
...
@@ -153,14 +152,14 @@ PM QoS list of resume latency constraints and remove sysfs attribute
pm_qos_resume_latency_us from the device's power directory.
pm_qos_resume_latency_us from the device's power directory.
int dev_pm_qos_expose_flags(device, value)
int dev_pm_qos_expose_flags(device, value)
Add a request to the device's PM QoS list of flags and create sysfs attribute
s
Add a request to the device's PM QoS list of flags and create sysfs attribute
pm_qos_no_power_off
and pm_qos_remote_wakeup under the device's power directory
pm_qos_no_power_off
under the device's power directory allowing user space to
allowing user space to change these flags' value
.
change the value of the PM_QOS_FLAG_NO_POWER_OFF flag
.
void dev_pm_qos_hide_flags(device)
void dev_pm_qos_hide_flags(device)
Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list
Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list
of flags and remove sysfs attribute
s pm_qos_no_power_off and pm_qos_remote_wakeup
of flags and remove sysfs attribute
pm_qos_no_power_off from the device's power
under the device's power
directory.
directory.
Notification mechanisms:
Notification mechanisms:
The per-device PM QoS framework has a per-device notification tree.
The per-device PM QoS framework has a per-device notification tree.
...
...
drivers/acpi/device_pm.c
View file @
048f35ff
...
@@ -581,8 +581,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev,
...
@@ -581,8 +581,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev,
d_min
=
ret
;
d_min
=
ret
;
wakeup
=
device_may_wakeup
(
dev
)
&&
adev
->
wakeup
.
flags
.
valid
wakeup
=
device_may_wakeup
(
dev
)
&&
adev
->
wakeup
.
flags
.
valid
&&
adev
->
wakeup
.
sleep_state
>=
target_state
;
&&
adev
->
wakeup
.
sleep_state
>=
target_state
;
}
else
if
(
dev_pm_qos_flags
(
dev
,
PM_QOS_FLAG_REMOTE_WAKEUP
)
!=
}
else
{
PM_QOS_FLAGS_NONE
)
{
wakeup
=
adev
->
wakeup
.
flags
.
valid
;
wakeup
=
adev
->
wakeup
.
flags
.
valid
;
}
}
...
@@ -865,8 +864,7 @@ int acpi_dev_runtime_suspend(struct device *dev)
...
@@ -865,8 +864,7 @@ int acpi_dev_runtime_suspend(struct device *dev)
if
(
!
adev
)
if
(
!
adev
)
return
0
;
return
0
;
remote_wakeup
=
dev_pm_qos_flags
(
dev
,
PM_QOS_FLAG_REMOTE_WAKEUP
)
>
remote_wakeup
=
acpi_device_can_wakeup
(
adev
);
PM_QOS_FLAGS_NONE
;
if
(
remote_wakeup
)
{
if
(
remote_wakeup
)
{
error
=
acpi_device_wakeup_enable
(
adev
,
ACPI_STATE_S0
);
error
=
acpi_device_wakeup_enable
(
adev
,
ACPI_STATE_S0
);
if
(
error
)
if
(
error
)
...
...
drivers/base/power/domain.c
View file @
048f35ff
...
@@ -346,9 +346,7 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on,
...
@@ -346,9 +346,7 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on,
list_for_each_entry
(
pdd
,
&
genpd
->
dev_list
,
list_node
)
{
list_for_each_entry
(
pdd
,
&
genpd
->
dev_list
,
list_node
)
{
enum
pm_qos_flags_status
stat
;
enum
pm_qos_flags_status
stat
;
stat
=
dev_pm_qos_flags
(
pdd
->
dev
,
stat
=
dev_pm_qos_flags
(
pdd
->
dev
,
PM_QOS_FLAG_NO_POWER_OFF
);
PM_QOS_FLAG_NO_POWER_OFF
|
PM_QOS_FLAG_REMOTE_WAKEUP
);
if
(
stat
>
PM_QOS_FLAGS_NONE
)
if
(
stat
>
PM_QOS_FLAGS_NONE
)
return
-
EBUSY
;
return
-
EBUSY
;
...
...
drivers/base/power/sysfs.c
View file @
048f35ff
...
@@ -309,33 +309,6 @@ static ssize_t pm_qos_no_power_off_store(struct device *dev,
...
@@ -309,33 +309,6 @@ static ssize_t pm_qos_no_power_off_store(struct device *dev,
static
DEVICE_ATTR
(
pm_qos_no_power_off
,
0644
,
static
DEVICE_ATTR
(
pm_qos_no_power_off
,
0644
,
pm_qos_no_power_off_show
,
pm_qos_no_power_off_store
);
pm_qos_no_power_off_show
,
pm_qos_no_power_off_store
);
static
ssize_t
pm_qos_remote_wakeup_show
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
return
sprintf
(
buf
,
"%d
\n
"
,
!!
(
dev_pm_qos_requested_flags
(
dev
)
&
PM_QOS_FLAG_REMOTE_WAKEUP
));
}
static
ssize_t
pm_qos_remote_wakeup_store
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
n
)
{
int
ret
;
if
(
kstrtoint
(
buf
,
0
,
&
ret
))
return
-
EINVAL
;
if
(
ret
!=
0
&&
ret
!=
1
)
return
-
EINVAL
;
ret
=
dev_pm_qos_update_flags
(
dev
,
PM_QOS_FLAG_REMOTE_WAKEUP
,
ret
);
return
ret
<
0
?
ret
:
n
;
}
static
DEVICE_ATTR
(
pm_qos_remote_wakeup
,
0644
,
pm_qos_remote_wakeup_show
,
pm_qos_remote_wakeup_store
);
#ifdef CONFIG_PM_SLEEP
#ifdef CONFIG_PM_SLEEP
static
const
char
_enabled
[]
=
"enabled"
;
static
const
char
_enabled
[]
=
"enabled"
;
static
const
char
_disabled
[]
=
"disabled"
;
static
const
char
_disabled
[]
=
"disabled"
;
...
@@ -671,7 +644,6 @@ static const struct attribute_group pm_qos_latency_tolerance_attr_group = {
...
@@ -671,7 +644,6 @@ static const struct attribute_group pm_qos_latency_tolerance_attr_group = {
static
struct
attribute
*
pm_qos_flags_attrs
[]
=
{
static
struct
attribute
*
pm_qos_flags_attrs
[]
=
{
&
dev_attr_pm_qos_no_power_off
.
attr
,
&
dev_attr_pm_qos_no_power_off
.
attr
,
&
dev_attr_pm_qos_remote_wakeup
.
attr
,
NULL
,
NULL
,
};
};
static
const
struct
attribute_group
pm_qos_flags_attr_group
=
{
static
const
struct
attribute_group
pm_qos_flags_attr_group
=
{
...
...
include/linux/pm_qos.h
View file @
048f35ff
...
@@ -39,7 +39,6 @@ enum pm_qos_flags_status {
...
@@ -39,7 +39,6 @@ enum pm_qos_flags_status {
#define PM_QOS_LATENCY_ANY ((s32)(~(__u32)0 >> 1))
#define PM_QOS_LATENCY_ANY ((s32)(~(__u32)0 >> 1))
#define PM_QOS_FLAG_NO_POWER_OFF (1 << 0)
#define PM_QOS_FLAG_NO_POWER_OFF (1 << 0)
#define PM_QOS_FLAG_REMOTE_WAKEUP (1 << 1)
struct
pm_qos_request
{
struct
pm_qos_request
{
struct
plist_node
node
;
struct
plist_node
node
;
...
...
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