Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 09948665 authored by Matthias Kaehlcke's avatar Matthias Kaehlcke Committed by Sharat Masetty
Browse files

PM / devfreq: Make update_devfreq() public



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.

Change-Id: I629c39eaa441a4d1cb675f73f0efb679e7a9e702
Signed-off-by: default avatarMatthias Kaehlcke <mka@chromium.org>
Acked-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Patch-mainline: linux-pm @ 14/6/18, 12:47
Signed-off-by: default avatarAkhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: default avatarSharat Masetty <smasetty@codeaurora.org>
parent f5a70edb
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@
 * Copyright (C) 2011 Samsung Electronics
 *	MyungJoo Ham <myungjoo.ham@samsung.com>
 *
 * Copyright (c) 2018 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
@@ -25,9 +27,6 @@
#define DEVFREQ_GOV_SUSPEND			0x4
#define DEVFREQ_GOV_RESUME			0x5

/* 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);
+10 −0
Original line number Diff line number Diff line
@@ -5,6 +5,8 @@
 * Copyright (C) 2011 Samsung Electronics
 *	MyungJoo Ham <myungjoo.ham@samsung.com>
 *
 * Copyright (c) 2018 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
@@ -201,6 +203,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);