Message ID | 20180525203043.249193-9-mka@chromium.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
>Currently update_devfreq() is only visible to devfreq governors outside >of devfreq.c. Make it public to allow drivers that adjust devfreq policies >to cause a re-evaluation of the frequency after a policy change. > >Signed-off-by: Matthias Kaehlcke <mka@chromium.org> >--- > drivers/devfreq/governor.h | 3 --- > include/linux/devfreq.h | 8 ++++++++ > 2 files changed, 8 insertions(+), 3 deletions(-) With the requirement from patch 9/11, this commit is reasonable enough. Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
diff --git a/drivers/devfreq/governor.h b/drivers/devfreq/governor.h index cfc50a61a90d..608e7549465b 100644 --- a/drivers/devfreq/governor.h +++ b/drivers/devfreq/governor.h @@ -54,9 +54,6 @@ struct devfreq_governor { unsigned int event, void *data); }; -/* Caution: devfreq->lock must be locked before calling update_devfreq */ -extern int update_devfreq(struct devfreq *devfreq); - extern void devfreq_monitor_start(struct devfreq *devfreq); extern void devfreq_monitor_stop(struct devfreq *devfreq); extern void devfreq_monitor_suspend(struct devfreq *devfreq); diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h index 4a6ed61bbe49..561ab1d5e8d6 100644 --- a/include/linux/devfreq.h +++ b/include/linux/devfreq.h @@ -222,6 +222,14 @@ extern void devm_devfreq_remove_device(struct device *dev, extern int devfreq_suspend_device(struct devfreq *devfreq); extern int devfreq_resume_device(struct devfreq *devfreq); +/** + * update_devfreq() - Reevaluate the device and configure frequency + * @devfreq: the devfreq device + * + * Note: devfreq->lock must be held + */ +extern int update_devfreq(struct devfreq *devfreq); + /* Helper functions for devfreq user device driver with OPP. */ extern struct dev_pm_opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, u32 flags);
Currently update_devfreq() is only visible to devfreq governors outside of devfreq.c. Make it public to allow drivers that adjust devfreq policies to cause a re-evaluation of the frequency after a policy change. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- drivers/devfreq/governor.h | 3 --- include/linux/devfreq.h | 8 ++++++++ 2 files changed, 8 insertions(+), 3 deletions(-)