|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7, v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13, v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3, v6.13-rc2, v6.13-rc1 |
|
| #
cb759522 |
| 18-Nov-2024 |
Wolfram Sang <[email protected]> |
PM: sleep: sysfs: don't include 'pm_wakeup.h' directly
The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove th
PM: sleep: sysfs: don't include 'pm_wakeup.h' directly
The header clearly states that it does not want to be included directly, only via 'device.h'. 'platform_device.h' works equally well. Remove the direct inclusion.
Signed-off-by: Wolfram Sang <[email protected]> Link: https://patch.msgid.link/[email protected] [ rjw: Subject edit ] Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v6.12, v6.12-rc7, v6.12-rc6 |
|
| #
eafb1a86 |
| 28-Oct-2024 |
Zijun Hu <[email protected]> |
driver core: Put device attribute @wakeup_last_time_ms and its show() together
Move location of dpm_sysfs_wakeup_change_owner() a bit to
- Put device attribute @wakeup_last_time_ms and its show() t
driver core: Put device attribute @wakeup_last_time_ms and its show() together
Move location of dpm_sysfs_wakeup_change_owner() a bit to
- Put device attribute @wakeup_last_time_ms and its show() together. - Put two different instances of dpm_sysfs_wakeup_change_owner() together.
That will make better code layout.
Signed-off-by: Zijun Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc5, v6.12-rc4, v6.12-rc3, v6.12-rc2, v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5, v6.10-rc4, v6.10-rc3, v6.10-rc2, v6.10-rc1, v6.9, v6.9-rc7, v6.9-rc6, v6.9-rc5, v6.9-rc4, v6.9-rc3, v6.9-rc2, v6.9-rc1, v6.8, v6.8-rc7, v6.8-rc6, v6.8-rc5, v6.8-rc4, v6.8-rc3, v6.8-rc2, v6.8-rc1, v6.7, v6.7-rc8, v6.7-rc7, v6.7-rc6, v6.7-rc5, v6.7-rc4, v6.7-rc3, v6.7-rc2, v6.7-rc1, v6.6, v6.6-rc7, v6.6-rc6, v6.6-rc5, v6.6-rc4, v6.6-rc3, v6.6-rc2, v6.6-rc1, v6.5, v6.5-rc7, v6.5-rc6, v6.5-rc5, v6.5-rc4, v6.5-rc3, v6.5-rc2, v6.5-rc1, v6.4, v6.4-rc7, v6.4-rc6, v6.4-rc5, v6.4-rc4, v6.4-rc3, v6.4-rc2, v6.4-rc1, v6.3, v6.3-rc7, v6.3-rc6, v6.3-rc5, v6.3-rc4, v6.3-rc3, v6.3-rc2, v6.3-rc1, v6.2, v6.2-rc8, v6.2-rc7, v6.2-rc6, v6.2-rc5, v6.2-rc4, v6.2-rc3, v6.2-rc2, v6.2-rc1, v6.1, v6.1-rc8, v6.1-rc7, v6.1-rc6, v6.1-rc5, v6.1-rc4, v6.1-rc3, v6.1-rc2, v6.1-rc1, v6.0, v6.0-rc7, v6.0-rc6, v6.0-rc5, v6.0-rc4, v6.0-rc3, v6.0-rc2, v6.0-rc1, v5.19, v5.19-rc8, v5.19-rc7, v5.19-rc6, v5.19-rc5, v5.19-rc4, v5.19-rc3, v5.19-rc2, v5.19-rc1, v5.18, v5.18-rc7, v5.18-rc6, v5.18-rc5, v5.18-rc4, v5.18-rc3, v5.18-rc2, v5.18-rc1, v5.17, v5.17-rc8, v5.17-rc7, v5.17-rc6, v5.17-rc5, v5.17-rc4, v5.17-rc3, v5.17-rc2, v5.17-rc1, v5.16, v5.16-rc8, v5.16-rc7, v5.16-rc6, v5.16-rc5, v5.16-rc4, v5.16-rc3, v5.16-rc2, v5.16-rc1, v5.15, v5.15-rc7, v5.15-rc6, v5.15-rc5, v5.15-rc4, v5.15-rc3, v5.15-rc2, v5.15-rc1, v5.14, v5.14-rc7, v5.14-rc6, v5.14-rc5, v5.14-rc4, v5.14-rc3, v5.14-rc2, v5.14-rc1, v5.13, v5.13-rc7, v5.13-rc6, v5.13-rc5, v5.13-rc4, v5.13-rc3, v5.13-rc2, v5.13-rc1, v5.12, v5.12-rc8, v5.12-rc7, v5.12-rc6, v5.12-rc5, v5.12-rc4, v5.12-rc3, v5.12-rc2, v5.12-rc1, v5.12-rc1-dontuse, v5.11, v5.11-rc7, v5.11-rc6, v5.11-rc5, v5.11-rc4, v5.11-rc3, v5.11-rc2, v5.11-rc1, v5.10, v5.10-rc7, v5.10-rc6, v5.10-rc5, v5.10-rc4, v5.10-rc3, v5.10-rc2, v5.10-rc1, v5.9, v5.9-rc8, v5.9-rc7, v5.9-rc6 |
|
| #
948b3edb |
| 16-Sep-2020 |
Joe Perches <[email protected]> |
drivers core: Miscellaneous changes for sysfs_emit
Change additional instances that could use sysfs_emit and sysfs_emit_at that the coccinelle script could not convert.
o macros creating show funct
drivers core: Miscellaneous changes for sysfs_emit
Change additional instances that could use sysfs_emit and sysfs_emit_at that the coccinelle script could not convert.
o macros creating show functions with ## concatenation o unbound sprintf uses with buf+len for start of output to sysfs_emit_at o returns with ?: tests and sprintf to sysfs_emit o sysfs output with struct class * not struct device * arguments
Miscellanea:
o remove unnecessary initializations around these changes o consistently use int len for return length of show functions o use octal permissions and not S_<FOO> o rename a few show function names so DEVICE_ATTR_<FOO> can be used o use DEVICE_ATTR_ADMIN_RO where appropriate o consistently use const char *output for strings o checkpatch/style neatening
Signed-off-by: Joe Perches <[email protected]> Link: https://lore.kernel.org/r/8bc24444fe2049a9b2de6127389b57edfdfe324d.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
27275d30 |
| 16-Sep-2020 |
Joe Perches <[email protected]> |
drivers core: Reindent a couple uses around sysfs_emit
Just a couple of whitespace realignment to open parenthesis for multi-line statements.
Signed-off-by: Joe Perches <[email protected]> Link: http
drivers core: Reindent a couple uses around sysfs_emit
Just a couple of whitespace realignment to open parenthesis for multi-line statements.
Signed-off-by: Joe Perches <[email protected]> Link: https://lore.kernel.org/r/33224191421dbb56015eded428edfddcba997d63.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
973c3911 |
| 16-Sep-2020 |
Joe Perches <[email protected]> |
drivers core: Remove strcat uses around sysfs_emit and neaten
strcat is no longer necessary for sysfs_emit and sysfs_emit_at uses.
Convert the strcat uses to sysfs_emit calls and neaten other block
drivers core: Remove strcat uses around sysfs_emit and neaten
strcat is no longer necessary for sysfs_emit and sysfs_emit_at uses.
Convert the strcat uses to sysfs_emit calls and neaten other block uses of direct returns to use an intermediate const char *.
Signed-off-by: Joe Perches <[email protected]> Link: https://lore.kernel.org/r/5d606519698ce4c8f1203a2b35797d8254c6050a.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
aa838896 |
| 16-Sep-2020 |
Joe Perches <[email protected]> |
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE b
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat sysfs_emit_dev.cocci @@ identifier d_show; identifier dev, attr, buf; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - sprintf(buf, + sysfs_emit(buf, ...); ...> }
@@ identifier d_show; identifier dev, attr, buf; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> }
@@ identifier d_show; identifier dev, attr, buf; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> }
@@ identifier d_show; identifier dev, attr, buf; expression chr; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... return - strcpy(buf, chr); + sysfs_emit(buf, chr); ...> }
@@ identifier d_show; identifier dev, attr, buf; identifier len; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - sprintf(buf, + sysfs_emit(buf, ...); ...> return len; }
@@ identifier d_show; identifier dev, attr, buf; identifier len; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - snprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; }
@@ identifier d_show; identifier dev, attr, buf; identifier len; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... len = - scnprintf(buf, PAGE_SIZE, + sysfs_emit(buf, ...); ...> return len; }
@@ identifier d_show; identifier dev, attr, buf; identifier len; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { <... - len += scnprintf(buf + len, PAGE_SIZE - len, + len += sysfs_emit_at(buf, len, ...); ...> return len; }
@@ identifier d_show; identifier dev, attr, buf; expression chr; @@
ssize_t d_show(struct device *dev, struct device_attribute *attr, char *buf) { ... - strcpy(buf, chr); - return strlen(buf); + return sysfs_emit(buf, chr); }
Signed-off-by: Joe Perches <[email protected]> Link: https://lore.kernel.org/r/3d033c33056d88bbe34d4ddb62afd05ee166ab9a.1600285923.git.joe@perches.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.9-rc5, v5.9-rc4, v5.9-rc3, v5.9-rc2, v5.9-rc1, v5.8, v5.8-rc7, v5.8-rc6, v5.8-rc5 |
|
| #
a45aca51 |
| 07-Jul-2020 |
Abhishek Pandit-Subedi <[email protected]> |
PM: sleep: core: Emit changed uevent on wakeup_sysfs_add/remove
Udev rules that depend on the power/wakeup attribute don't get triggered correctly if device_set_wakeup_capable is called after the de
PM: sleep: core: Emit changed uevent on wakeup_sysfs_add/remove
Udev rules that depend on the power/wakeup attribute don't get triggered correctly if device_set_wakeup_capable is called after the device is created. This can happen for several reasons (driver sets wakeup after device is created, wakeup is changed on parent device, etc) and it seems reasonable to emit a changed event when adding or removing attributes on the device.
Signed-off-by: Abhishek Pandit-Subedi <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Stephen Boyd <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v5.8-rc4, v5.8-rc3, v5.8-rc2, v5.8-rc1, v5.7 |
|
| #
9a787546 |
| 28-May-2020 |
Rafael J. Wysocki <[email protected]> |
PM: runtime: Replace pm_runtime_callbacks_present()
The name of pm_runtime_callbacks_present() is confusing, because it suggests that the device has PM-runtime callbacks if 'true' is returned by tha
PM: runtime: Replace pm_runtime_callbacks_present()
The name of pm_runtime_callbacks_present() is confusing, because it suggests that the device has PM-runtime callbacks if 'true' is returned by that function, but in fact that may not be the case, so replace it with pm_runtime_has_no_callbacks() which is not ambiguous.
No functional impact.
Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Ulf Hansson <[email protected]>
show more ...
|
|
Revision tags: v5.7-rc7, v5.7-rc6, v5.7-rc5, v5.7-rc4, v5.7-rc3, v5.7-rc2, v5.7-rc1, v5.6, v5.6-rc7, v5.6-rc6, v5.6-rc5, v5.6-rc4 |
|
| #
3b52fc5d |
| 27-Feb-2020 |
Christian Brauner <[email protected]> |
drivers/base/power: add dpm_sysfs_change_owner()
Add a helper to change the owner of a device's power entries. This needs to happen when the ownership of a device is changed, e.g. when moving networ
drivers/base/power: add dpm_sysfs_change_owner()
Add a helper to change the owner of a device's power entries. This needs to happen when the ownership of a device is changed, e.g. when moving network devices between network namespaces. This function will be used to correctly account for ownership changes, e.g. when moving network devices between network namespaces.
Reviewed-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: "Rafael J. Wysocki" <[email protected]> Signed-off-by: Christian Brauner <[email protected]> Signed-off-by: David S. Miller <[email protected]>
show more ...
|
|
Revision tags: v5.6-rc3, v5.6-rc2, v5.6-rc1, v5.5, v5.5-rc7, v5.5-rc6, v5.5-rc5, v5.5-rc4, v5.5-rc3, v5.5-rc2, v5.5-rc1, v5.4, v5.4-rc8, v5.4-rc7, v5.4-rc6, v5.4-rc5, v5.4-rc4, v5.4-rc3, v5.4-rc2, v5.4-rc1, v5.3, v5.3-rc8, v5.3-rc7, v5.3-rc6 |
|
| #
2ca3d1ec |
| 19-Aug-2019 |
Stephen Boyd <[email protected]> |
PM / wakeup: Register wakeup class kobj after device is added
The device_set_wakeup_enable() function can be called on a device that hasn't been registered with device_add() yet. This allows the dev
PM / wakeup: Register wakeup class kobj after device is added
The device_set_wakeup_enable() function can be called on a device that hasn't been registered with device_add() yet. This allows the device to be in a state where wakeup is enabled for it but the device isn't published to userspace in sysfs yet.
After commit c8377adfa781 ("PM / wakeup: Show wakeup sources stats in sysfs"), calling device_set_wakeup_enable() will fail for a device that hasn't been registered with the driver core via device_add(). This is because we try to create sysfs entries for the device and associate a wakeup class kobject with it before the device has been registered. Let's follow a similar approach that device_set_wakeup_capable() takes here and register the wakeup class either from device_set_wakeup_enable() when the device is already registered, or from dpm_sysfs_add() when the device is being registered with the driver core via device_add().
Fixes: c8377adfa781 ("PM / wakeup: Show wakeup sources stats in sysfs") Reported-by: Qian Cai <[email protected]> Reviewed-by: Tri Vo <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v5.3-rc5, v5.3-rc4, v5.3-rc3, v5.3-rc2, v5.3-rc1, v5.2, v5.2-rc7, v5.2-rc6, v5.2-rc5, v5.2-rc4, v5.2-rc3, v5.2-rc2, v5.2-rc1, v5.1, v5.1-rc7, v5.1-rc6, v5.1-rc5, v5.1-rc4 |
|
| #
5de363b6 |
| 02-Apr-2019 |
Greg Kroah-Hartman <[email protected]> |
drivers: base: power: add proper SPDX identifiers on files that did not have them.
There were a few files in the driver core power code that did not have SPDX identifiers on them, so fix that up. A
drivers: base: power: add proper SPDX identifiers on files that did not have them.
There were a few files in the driver core power code that did not have SPDX identifiers on them, so fix that up. At the same time, remove the "free form" text that specified the license of the file, as that is impossible for any tool to properly parse.
Cc: "Rafael J. Wysocki" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v5.1-rc3, v5.1-rc2, v5.1-rc1 |
|
| #
0996584b |
| 05-Mar-2019 |
Ulf Hansson <[email protected]> |
PM-runtime: Call pm_runtime_active|suspended_time() from sysfs
Avoid the open-coding of the accounted time acquisition in runtime_active|suspend_time_show() and make them call pm_runtime_active|susp
PM-runtime: Call pm_runtime_active|suspended_time() from sysfs
Avoid the open-coding of the accounted time acquisition in runtime_active|suspend_time_show() and make them call pm_runtime_active|suspended_time() instead.
Note that this change also indirectly avoids holding dev->power.lock around the do_div() computation and the sprintf() call which is an additional improvement.
Signed-off-by: Ulf Hansson <[email protected]> [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v5.0, v5.0-rc8, v5.0-rc7 |
|
| #
85945c28 |
| 14-Feb-2019 |
Sudeep Holla <[email protected]> |
PM / core: Add support to skip power management in device/driver model
All device objects in the driver model contain fields that control the handling of various power management activities. However
PM / core: Add support to skip power management in device/driver model
All device objects in the driver model contain fields that control the handling of various power management activities. However, it's not always useful. There are few instances where pseudo devices are added to the model just to take advantage of many other features like kobjects, udev events, and so on. One such example is cpu devices and their caches.
The sysfs for the cpu caches are managed by adding devices with cpu as the parent in cpu_device_create() when secondary cpu is brought online. Generally when the secondary CPUs are hotplugged back in as part of resume from suspend-to-ram, we call cpu_device_create() from the cpu hotplug state machine while the cpu device associated with that CPU is not yet ready to be resumed as the device_resume() call happens bit later. It's not really needed to set the flag is_prepared for cpu devices as they are mostly pseudo device and hotplug framework deals with state machine and not managed through the cpu device.
This often results in annoying warning when resuming: Enabling non-boot CPUs ... CPU1: Booted secondary processor cache: parent cpu1 should not be sleeping CPU1 is up CPU2: Booted secondary processor cache: parent cpu2 should not be sleeping CPU2 is up .... and so on.
So in order to fix these kind of errors, we could just completely avoid doing any power management related initialisations and operations if they are not used by these devices.
Add no_pm flags to indicate that the device doesn't require any sort of PM activities and all of them can be completely skipped. We can use the same flag to also avoid adding not used *power* sysfs entries for these devices. For now, lets use this for cpu cache devices.
Reviewed-by: Ulf Hansson <[email protected]> Signed-off-by: Sudeep Holla <[email protected]> Tested-by: Eugeniu Rosca <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v5.0-rc6, v5.0-rc5, v5.0-rc4 |
|
| #
a08c2a5a |
| 23-Jan-2019 |
Thara Gopinath <[email protected]> |
PM-runtime: Replace jiffies-based accounting with ktime-based accounting
Replace jiffies-based accounting for runtime_active_time and runtime_suspended_time with ktime-based accounting. This makes t
PM-runtime: Replace jiffies-based accounting with ktime-based accounting
Replace jiffies-based accounting for runtime_active_time and runtime_suspended_time with ktime-based accounting. This makes the runtime debug counters inline with genpd and other PM subsytems which use ktime-based accounting.
Timekeeping is initialized before driver_init(). It's only at that time that PM-runtime can be enabled.
Signed-off-by: Thara Gopinath <[email protected]> [switch from ktime to raw nsec] Signed-off-by: Vincent Guittot <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v5.0-rc3, v5.0-rc2, v5.0-rc1, v4.20, v4.20-rc7, v4.20-rc6, v4.20-rc5, v4.20-rc4, v4.20-rc3, v4.20-rc2, v4.20-rc1, v4.19, v4.19-rc8, v4.19-rc7, v4.19-rc6, v4.19-rc5, v4.19-rc4, v4.19-rc3, v4.19-rc2, v4.19-rc1, v4.18, v4.18-rc8, v4.18-rc7, v4.18-rc6, v4.18-rc5, v4.18-rc4, v4.18-rc3, v4.18-rc2, v4.18-rc1, v4.17 |
|
| #
2d5ed61c |
| 02-Jun-2018 |
Ravi Chandra Sadineni <[email protected]> |
PM / wakeup: Export wakeup_count instead of event_count via sysfs
Currently we export event_count instead of wakeup_count via the per-device wakeup_count sysfs attribute. Change it to wakeup_count t
PM / wakeup: Export wakeup_count instead of event_count via sysfs
Currently we export event_count instead of wakeup_count via the per-device wakeup_count sysfs attribute. Change it to wakeup_count to make it more meaningful.
wakeup_count increments only when events_check_enabled is set, that is whenever writes the current wakeup count to /sys/power/wakeup_count. Also events_check_enabled is cleared on every resume. User space is expected to write to this just before suspend. This way pm_wakeup_event(), when called from IRQs handles, will increment wakeup_count only if we are in system-wide suspend-resume cycle and should give a fair approximation of how many times a device may have triggered a wakeup from system suspend.
event_count on the other hand will increment every time pm_wakeup_event() is called irrespective of whether we are in a suspend-resume cycle and some drivers call it on every interrupt which makes it less useful for system wakeup tracking.
Signed-off-by: Ravi Chandra Sadineni <[email protected]> Acked-by: Pavel Machek <[email protected]> [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v4.17-rc7, v4.17-rc6, v4.17-rc5, v4.17-rc4, v4.17-rc3, v4.17-rc2, v4.17-rc1, v4.16, v4.16-rc7, v4.16-rc6, v4.16-rc5, v4.16-rc4, v4.16-rc3, v4.16-rc2, v4.16-rc1, v4.15, v4.15-rc9, v4.15-rc8, v4.15-rc7, v4.15-rc6, v4.15-rc5, v4.15-rc4, v4.15-rc3, v4.15-rc2, v4.15-rc1, v4.14 |
|
| #
47acbd77 |
| 10-Nov-2017 |
Andy Shevchenko <[email protected]> |
PM / sysfs: Convert to use DEVICE_ATTR_RO / DEVICE_ATTR_RW
Use DEVICE_ATTR_RO() and DEVICE_ATTR_RW() macros instead of open coding them.
No functional change intended.
Signed-off-by: Andy Shevchen
PM / sysfs: Convert to use DEVICE_ATTR_RO / DEVICE_ATTR_RW
Use DEVICE_ATTR_RO() and DEVICE_ATTR_RW() macros instead of open coding them.
No functional change intended.
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
| #
f0e6d9f1 |
| 10-Nov-2017 |
Andy Shevchenko <[email protected]> |
PM / sysfs: Remove redundant 'else' keyword.
There is no need to use 'else' if in main branch 'return' is present.
No functional change intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@
PM / sysfs: Remove redundant 'else' keyword.
There is no need to use 'else' if in main branch 'return' is present.
No functional change intended.
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
| #
325c4b3b |
| 10-Nov-2017 |
Andy Shevchenko <[email protected]> |
PM / sysfs: Convert to use sysfs_streq()
...instead of custom approach.
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafae
PM / sysfs: Convert to use sysfs_streq()
...instead of custom approach.
Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
| #
0759e80b |
| 07-Nov-2017 |
Rafael J. Wysocki <[email protected]> |
PM / QoS: Fix device resume latency framework
The special value of 0 for device resume latency PM QoS means "no restriction", but there are two problems with that.
First, device resume latency PM Q
PM / QoS: Fix device resume latency framework
The special value of 0 for device resume latency PM QoS means "no restriction", but there are two problems with that.
First, device resume latency PM QoS requests with 0 as the value are always put in front of requests with positive values in the priority lists used internally by the PM QoS framework, causing 0 to be chosen as an effective constraint value. However, that 0 is then interpreted as "no restriction" effectively overriding the other requests with specific restrictions which is incorrect.
Second, the users of device resume latency PM QoS have no way to specify that *any* resume latency at all should be avoided, which is an artificial limitation in general.
To address these issues, modify device resume latency PM QoS to use S32_MAX as the "no constraint" value and 0 as the "no latency at all" one and rework its users (the cpuidle menu governor, the genpd QoS governor and the runtime PM framework) to follow these changes.
Also add a special "n/a" value to the corresponding user space I/F to allow user space to indicate that it cannot accept any resume latencies at all for the given device.
Fixes: 85dc0b8a4019 (PM / QoS: Make it possible to expose PM QoS latency constraints) Link: https://bugzilla.kernel.org/show_bug.cgi?id=197323 Reported-by: Reinette Chatre <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Reinette Chatre <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Tested-by: Tero Kristo <[email protected]> Reviewed-by: Ramesh Thomas <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc8 |
|
| #
d5919dcc |
| 31-Oct-2017 |
Rafael J. Wysocki <[email protected]> |
Revert "PM / QoS: Fix device resume latency PM QoS"
This reverts commit 0cc2b4e5a020 (PM / QoS: Fix device resume latency PM QoS) as it introduced regressions on multiple systems and the fix-up in c
Revert "PM / QoS: Fix device resume latency PM QoS"
This reverts commit 0cc2b4e5a020 (PM / QoS: Fix device resume latency PM QoS) as it introduced regressions on multiple systems and the fix-up in commit 2a9a86d5c813 (PM / QoS: Fix default runtime_pm device resume latency) does not address all of them.
The original problem that commit 0cc2b4e5a020 was attempting to fix will be addressed later.
Fixes: 0cc2b4e5a020 (PM / QoS: Fix device resume latency PM QoS) Reported-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc7 |
|
| #
0cc2b4e5 |
| 24-Oct-2017 |
Rafael J. Wysocki <[email protected]> |
PM / QoS: Fix device resume latency PM QoS
The special value of 0 for device resume latency PM QoS means "no restriction", but there are two problems with that.
First, device resume latency PM QoS
PM / QoS: Fix device resume latency PM QoS
The special value of 0 for device resume latency PM QoS means "no restriction", but there are two problems with that.
First, device resume latency PM QoS requests with 0 as the value are always put in front of requests with positive values in the priority lists used internally by the PM QoS framework, causing 0 to be chosen as an effective constraint value. However, that 0 is then interpreted as "no restriction" effectively overriding the other requests with specific restrictions which is incorrect.
Second, the users of device resume latency PM QoS have no way to specify that *any* resume latency at all should be avoided, which is an artificial limitation in general.
To address these issues, modify device resume latency PM QoS to use S32_MAX as the "no constraint" value and 0 as the "no latency at all" one and rework its users (the cpuidle menu governor, the genpd QoS governor and the runtime PM framework) to follow these changes.
Also add a special "n/a" value to the corresponding user space I/F to allow user space to indicate that it cannot accept any resume latencies at all for the given device.
Fixes: 85dc0b8a4019 (PM / QoS: Make it possible to expose PM QoS latency constraints) Link: https://bugzilla.kernel.org/show_bug.cgi?id=197323 Reported-by: Reinette Chatre <[email protected]> Tested-by: Reinette Chatre <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Alex Shi <[email protected]> Cc: All applicable <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc6, v4.14-rc5 |
|
| #
20f97caf |
| 13-Oct-2017 |
Rafael J. Wysocki <[email protected]> |
PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP
The PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP is not used consistently and the vast majority of code simply assumes that remote wakeup should be enabled for devi
PM / QoS: Drop PM_QOS_FLAG_REMOTE_WAKEUP
The PM QoS flag PM_QOS_FLAG_REMOTE_WAKEUP is not used consistently and the vast majority of code simply assumes that remote wakeup should be enabled for devices in runtime suspend if they can generate wakeup signals, so drop it.
Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Ulf Hansson <[email protected]> Reviewed-by: Mika Westerberg <[email protected]>
show more ...
|
|
Revision tags: v4.14-rc4, v4.14-rc3, v4.14-rc2, v4.14-rc1, v4.13, v4.13-rc7, v4.13-rc6, v4.13-rc5, v4.13-rc4, v4.13-rc3, v4.13-rc2, v4.13-rc1 |
|
| #
2ca30331 |
| 10-Jul-2017 |
Dan Carpenter <[email protected]> |
PM / QoS: return -EINVAL for bogus strings
In the current code, if the user accidentally writes a bogus command to this sysfs file, then we set the latency tolerance to an uninitialized variable.
F
PM / QoS: return -EINVAL for bogus strings
In the current code, if the user accidentally writes a bogus command to this sysfs file, then we set the latency tolerance to an uninitialized variable.
Fixes: 2d984ad132a8 (PM / QoS: Introcuce latency tolerance device PM QoS type) Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Pavel Machek <[email protected]> Cc: 3.15+ <[email protected]> # 3.15+ Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v4.12, v4.12-rc7 |
|
| #
dbb1d8b7 |
| 22-Jun-2017 |
Arvind Yadav <[email protected]> |
PM / QoS: constify *_attribute_group.
File size before: text data bss dec hex filename 3890 1152 8 5050 13ba drivers/base/power/sysfs.o
File size After adding 'c
PM / QoS: constify *_attribute_group.
File size before: text data bss dec hex filename 3890 1152 8 5050 13ba drivers/base/power/sysfs.o
File size After adding 'const': text data bss dec hex filename 4250 800 8 5058 13c2 drivers/base/power/sysfs.o
Signed-off-by: Arvind Yadav <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|
|
Revision tags: v4.12-rc6 |
|
| #
cbcba35d |
| 12-Jun-2017 |
Krzysztof Kozlowski <[email protected]> |
PM / sysfs: Constify attribute groups
Local instances of struct attribute_group are not modified so they can be made const to increase code safeness.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel
PM / sysfs: Constify attribute groups
Local instances of struct attribute_group are not modified so they can be made const to increase code safeness.
Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
show more ...
|