Commit e8ad8d51 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge tag 'devfreq-fixes-for-5.5-rc2' of...

Merge tag 'devfreq-fixes-for-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux

Pull devfreq updates for 5.5-rc1 from Chanwoo Choi:

"Update devfreq core:

 - Add PM QoS support for devfreq device with following QoS type.
   External user of devfreq device can request the minimum and
   maximum frequency according to their multiple requirements.
   : DEV_PM_QOS_MIN_FREQUENCY is used for requesting the minimum
     device frequency.
   : DEV_PM_QOS_MAX_FREQUENCY is used for requesting the maximum
     device frequency.

 - Use PM QoS interface when entering the min/max_freq via sysfs
   interface.

 - Add get_freq_range() helper function in order to get the final
   min/max frequency among the multiple requirements of min/max
   frequency.

 - Fix a function return value and modify code for more correct
   exception handling if errors happen."

* tag 'devfreq-fixes-for-5.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/linux:
  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
parents e42617b8 27dbc542
This diff is collapsed.
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/notifier.h> #include <linux/notifier.h>
#include <linux/pm_opp.h> #include <linux/pm_opp.h>
#include <linux/pm_qos.h>
#define DEVFREQ_NAME_LEN 16 #define DEVFREQ_NAME_LEN 16
...@@ -123,8 +124,8 @@ struct devfreq_dev_profile { ...@@ -123,8 +124,8 @@ struct devfreq_dev_profile {
* @previous_freq: previously configured frequency value. * @previous_freq: previously configured frequency value.
* @data: Private data of the governor. The devfreq framework does not * @data: Private data of the governor. The devfreq framework does not
* touch this. * touch this.
* @min_freq: Limit minimum frequency requested by user (0: none) * @user_min_freq_req: PM QoS minimum frequency request from user (via sysfs)
* @max_freq: Limit maximum frequency requested by user (0: none) * @user_max_freq_req: PM QoS maximum frequency request from user (via sysfs)
* @scaling_min_freq: Limit minimum frequency requested by OPP interface * @scaling_min_freq: Limit minimum frequency requested by OPP interface
* @scaling_max_freq: Limit maximum frequency requested by OPP interface * @scaling_max_freq: Limit maximum frequency requested by OPP interface
* @stop_polling: devfreq polling status of a device. * @stop_polling: devfreq polling status of a device.
...@@ -136,6 +137,8 @@ struct devfreq_dev_profile { ...@@ -136,6 +137,8 @@ struct devfreq_dev_profile {
* @time_in_state: Statistics of devfreq states * @time_in_state: Statistics of devfreq states
* @last_stat_updated: The last time stat updated * @last_stat_updated: The last time stat updated
* @transition_notifier_list: list head of DEVFREQ_TRANSITION_NOTIFIER notifier * @transition_notifier_list: list head of DEVFREQ_TRANSITION_NOTIFIER notifier
* @nb_min: Notifier block for DEV_PM_QOS_MIN_FREQUENCY
* @nb_max: Notifier block for DEV_PM_QOS_MAX_FREQUENCY
* *
* This structure stores the devfreq information for a give device. * This structure stores the devfreq information for a give device.
* *
...@@ -161,8 +164,8 @@ struct devfreq { ...@@ -161,8 +164,8 @@ struct devfreq {
void *data; /* private data for governors */ void *data; /* private data for governors */
unsigned long min_freq; struct dev_pm_qos_request user_min_freq_req;
unsigned long max_freq; struct dev_pm_qos_request user_max_freq_req;
unsigned long scaling_min_freq; unsigned long scaling_min_freq;
unsigned long scaling_max_freq; unsigned long scaling_max_freq;
bool stop_polling; bool stop_polling;
...@@ -178,6 +181,9 @@ struct devfreq { ...@@ -178,6 +181,9 @@ struct devfreq {
unsigned long last_stat_updated; unsigned long last_stat_updated;
struct srcu_notifier_head transition_notifier_list; struct srcu_notifier_head transition_notifier_list;
struct notifier_block nb_min;
struct notifier_block nb_max;
}; };
struct devfreq_freqs { struct devfreq_freqs {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment