Loading Documentation/ABI/testing/sysfs-devices-power +3 −17 Original line number Diff line number Diff line Loading @@ -211,7 +211,9 @@ Description: device, after it has been suspended at run time, from a resume request to the moment the device will be ready to process I/O, in microseconds. If it is equal to 0, however, this means that the PM QoS resume latency may be arbitrary. the PM QoS resume latency may be arbitrary and the special value "n/a" means that user space cannot accept any resume latency at all for the given device. Not all drivers support this attribute. If it isn't supported, it is not present. Loading Loading @@ -258,19 +260,3 @@ Description: This attribute has no effect on system-wide suspend/resume and 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 +6 −7 Original line number Diff line number Diff line Loading @@ -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 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' values. Two device PM QoS flags are defined currently: PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP. values. One device PM QoS flag is defined currently: PM_QOS_FLAG_NO_POWER_OFF. Note: The aggregated target values are implemented in such a way that reading the aggregated value does not require any locking mechanism. Loading Loading @@ -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. int dev_pm_qos_expose_flags(device, value) Add a request to the device's PM QoS list of flags and create sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory allowing user space to change these flags' value. Add a request to the device's PM QoS list of flags and create sysfs attribute pm_qos_no_power_off under the device's power directory allowing user space to change the value of the PM_QOS_FLAG_NO_POWER_OFF flag. void dev_pm_qos_hide_flags(device) Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory. of flags and remove sysfs attribute pm_qos_no_power_off from the device's power directory. Notification mechanisms: The per-device PM QoS framework has a per-device notification tree. Loading drivers/acpi/device_pm.c +2 −4 Original line number Diff line number Diff line Loading @@ -581,8 +581,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev, d_min = ret; wakeup = device_may_wakeup(dev) && adev->wakeup.flags.valid && adev->wakeup.sleep_state >= target_state; } else if (dev_pm_qos_flags(dev, PM_QOS_FLAG_REMOTE_WAKEUP) != PM_QOS_FLAGS_NONE) { } else { wakeup = adev->wakeup.flags.valid; } Loading Loading @@ -865,8 +864,7 @@ int acpi_dev_runtime_suspend(struct device *dev) if (!adev) return 0; remote_wakeup = dev_pm_qos_flags(dev, PM_QOS_FLAG_REMOTE_WAKEUP) > PM_QOS_FLAGS_NONE; remote_wakeup = acpi_device_can_wakeup(adev); if (remote_wakeup) { error = acpi_device_wakeup_enable(adev, ACPI_STATE_S0); if (error) Loading drivers/base/cpu.c +2 −1 Original line number Diff line number Diff line Loading @@ -377,7 +377,8 @@ int register_cpu(struct cpu *cpu, int num) per_cpu(cpu_sys_devices, num) = &cpu->dev; register_cpu_under_node(num, cpu_to_node(num)); dev_pm_qos_expose_latency_limit(&cpu->dev, 0); dev_pm_qos_expose_latency_limit(&cpu->dev, PM_QOS_RESUME_LATENCY_NO_CONSTRAINT); return 0; } Loading drivers/base/power/domain.c +2 −4 Original line number Diff line number Diff line Loading @@ -445,9 +445,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) { enum pm_qos_flags_status stat; stat = dev_pm_qos_flags(pdd->dev, PM_QOS_FLAG_NO_POWER_OFF | PM_QOS_FLAG_REMOTE_WAKEUP); stat = dev_pm_qos_flags(pdd->dev, PM_QOS_FLAG_NO_POWER_OFF); if (stat > PM_QOS_FLAGS_NONE) return -EBUSY; Loading Loading @@ -1329,7 +1327,7 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, gpd_data->base.dev = dev; gpd_data->td.constraint_changed = true; gpd_data->td.effective_constraint_ns = 0; gpd_data->td.effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS; gpd_data->nb.notifier_call = genpd_dev_pm_qos_notifier; spin_lock_irq(&dev->power.lock); Loading Loading
Documentation/ABI/testing/sysfs-devices-power +3 −17 Original line number Diff line number Diff line Loading @@ -211,7 +211,9 @@ Description: device, after it has been suspended at run time, from a resume request to the moment the device will be ready to process I/O, in microseconds. If it is equal to 0, however, this means that the PM QoS resume latency may be arbitrary. the PM QoS resume latency may be arbitrary and the special value "n/a" means that user space cannot accept any resume latency at all for the given device. Not all drivers support this attribute. If it isn't supported, it is not present. Loading Loading @@ -258,19 +260,3 @@ Description: This attribute has no effect on system-wide suspend/resume and 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 +6 −7 Original line number Diff line number Diff line Loading @@ -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 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' values. Two device PM QoS flags are defined currently: PM_QOS_FLAG_NO_POWER_OFF and PM_QOS_FLAG_REMOTE_WAKEUP. values. One device PM QoS flag is defined currently: PM_QOS_FLAG_NO_POWER_OFF. Note: The aggregated target values are implemented in such a way that reading the aggregated value does not require any locking mechanism. Loading Loading @@ -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. int dev_pm_qos_expose_flags(device, value) Add a request to the device's PM QoS list of flags and create sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory allowing user space to change these flags' value. Add a request to the device's PM QoS list of flags and create sysfs attribute pm_qos_no_power_off under the device's power directory allowing user space to change the value of the PM_QOS_FLAG_NO_POWER_OFF flag. void dev_pm_qos_hide_flags(device) Drop the request added by dev_pm_qos_expose_flags() from the device's PM QoS list of flags and remove sysfs attributes pm_qos_no_power_off and pm_qos_remote_wakeup under the device's power directory. of flags and remove sysfs attribute pm_qos_no_power_off from the device's power directory. Notification mechanisms: The per-device PM QoS framework has a per-device notification tree. Loading
drivers/acpi/device_pm.c +2 −4 Original line number Diff line number Diff line Loading @@ -581,8 +581,7 @@ static int acpi_dev_pm_get_state(struct device *dev, struct acpi_device *adev, d_min = ret; wakeup = device_may_wakeup(dev) && adev->wakeup.flags.valid && adev->wakeup.sleep_state >= target_state; } else if (dev_pm_qos_flags(dev, PM_QOS_FLAG_REMOTE_WAKEUP) != PM_QOS_FLAGS_NONE) { } else { wakeup = adev->wakeup.flags.valid; } Loading Loading @@ -865,8 +864,7 @@ int acpi_dev_runtime_suspend(struct device *dev) if (!adev) return 0; remote_wakeup = dev_pm_qos_flags(dev, PM_QOS_FLAG_REMOTE_WAKEUP) > PM_QOS_FLAGS_NONE; remote_wakeup = acpi_device_can_wakeup(adev); if (remote_wakeup) { error = acpi_device_wakeup_enable(adev, ACPI_STATE_S0); if (error) Loading
drivers/base/cpu.c +2 −1 Original line number Diff line number Diff line Loading @@ -377,7 +377,8 @@ int register_cpu(struct cpu *cpu, int num) per_cpu(cpu_sys_devices, num) = &cpu->dev; register_cpu_under_node(num, cpu_to_node(num)); dev_pm_qos_expose_latency_limit(&cpu->dev, 0); dev_pm_qos_expose_latency_limit(&cpu->dev, PM_QOS_RESUME_LATENCY_NO_CONSTRAINT); return 0; } Loading
drivers/base/power/domain.c +2 −4 Original line number Diff line number Diff line Loading @@ -445,9 +445,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) { enum pm_qos_flags_status stat; stat = dev_pm_qos_flags(pdd->dev, PM_QOS_FLAG_NO_POWER_OFF | PM_QOS_FLAG_REMOTE_WAKEUP); stat = dev_pm_qos_flags(pdd->dev, PM_QOS_FLAG_NO_POWER_OFF); if (stat > PM_QOS_FLAGS_NONE) return -EBUSY; Loading Loading @@ -1329,7 +1327,7 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev, gpd_data->base.dev = dev; gpd_data->td.constraint_changed = true; gpd_data->td.effective_constraint_ns = 0; gpd_data->td.effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS; gpd_data->nb.notifier_call = genpd_dev_pm_qos_notifier; spin_lock_irq(&dev->power.lock); Loading