History

Merge tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki: "These add PM QoS support to devfreq and fix a few issues in that subsystem, fix two cpuidle issues and do one minor cleanup in there, and address an ACPI power management problem related to devices with special power management requirements, like fans. Specifics: - Add PM QoS support, based on the frequency QoS introduced during the 5.4 cycle, to devfreq (Leonard Crestez). - Fix some assorted devfreq issues (Leonard Crestez). - Fix an unintentional cpuidle behavior change (introduced during the 5.4 cycle) related to the active polling time limit (Marcelo Tosatti). - Fix a recently introduced cpuidle helper function and do a minor cleanup in the cpuidle core (Rafael Wysocki). - Avoid adding devices with special power management requirements, like fans, to the generic ACPI PM domain (Rafael Wysocki)" * tag 'pm-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: Drop unnecessary type cast in cpuidle_poll_time() cpuidle: Fix cpuidle_driver_state_disabled() ACPI: PM: Avoid attaching ACPI PM domain to certain devices cpuidle: use first valid target residency as poll time PM / devfreq: Use PM QoS for sysfs min/max_freq PM / devfreq: Add PM QoS support PM / devfreq: Don't fail devfreq_dev_release if not in list PM / devfreq: Introduce get_freq_range helper PM / devfreq: Set scaling_max_freq to max on OPP notifier error PM / devfreq: Fix devfreq_notifier_call returning errno

Linus Torvalds committed 6 years ago

Commit 6bd2c872 parents b61c562 4c845155 files · +235 −77Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/devfreq.h+10−4
@@ -13,6 +13,7 @@ · 12 unmodified lines
1313 #include <linux/device.h>
1414 #include <linux/notifier.h>
1515 #include <linux/pm_opp.h>
16+#include <linux/pm_qos.h>
1617
1718 #define DEVFREQ_NAME_LEN 16
1819
@@ -123,8 +124,8 @@ struct devfreq_dev_profile { · 104 unmodified lines
123124 * @previous_freq: previously configured frequency value.
124125 * @data: Private data of the governor. The devfreq framework does not
125126 * touch this.
126− * @min_freq: Limit minimum frequency requested by user (0: none)
127− * @max_freq: Limit maximum frequency requested by user (0: none)
127+ * @user_min_freq_req: PM QoS minimum frequency request from user (via sysfs)
128+ * @user_max_freq_req: PM QoS maximum frequency request from user (via sysfs)
128129 * @scaling_min_freq: Limit minimum frequency requested by OPP interface
129130 * @scaling_max_freq: Limit maximum frequency requested by OPP interface
130131 * @stop_polling: devfreq polling status of a device.
@@ -136,6 +137,8 @@ struct devfreq_dev_profile { · 5 unmodified lines
136137 * @time_in_state: Statistics of devfreq states
137138 * @last_stat_updated: The last time stat updated
138139 * @transition_notifier_list: list head of DEVFREQ_TRANSITION_NOTIFIER notifier
140+ * @nb_min: Notifier block for DEV_PM_QOS_MIN_FREQUENCY
141+ * @nb_max: Notifier block for DEV_PM_QOS_MAX_FREQUENCY
139142 *
140143 * This structure stores the devfreq information for a give device.
141144 *
@@ -161,8 +164,8 @@ struct devfreq { · 19 unmodified lines
161164
162165 void *data; /* private data for governors */
163166
164− unsigned long min_freq;
165− unsigned long max_freq;
167+ struct dev_pm_qos_request user_min_freq_req;
168+ struct dev_pm_qos_request user_max_freq_req;
166169 unsigned long scaling_min_freq;
167170 unsigned long scaling_max_freq;
168171 bool stop_polling;
@@ -178,6 +181,9 @@ struct devfreq { · 9 unmodified lines
178181 unsigned long last_stat_updated;
179182
180183 struct srcu_notifier_head transition_notifier_list;
184+
185+ struct notifier_block nb_min;
186+ struct notifier_block nb_max;
181187 };
182188
183189 struct devfreq_freqs {