Re: [PATCH] devfreq: fix initialization of current frequency in last status
From: MyungJoo Ham <myungjoo.ham@samsung.com>
Date: 2016-06-01 10:24:08
On Wed, Jun 1, 2016 at 5:30 PM, Javi Merino [off-list ref] wrote:
On Tue, May 31, 2016 at 11:25:09AM +0100, Lukasz Luba wrote:quoted
Some systems need current frequency from last_status for calculation but it is zeroed during initialization. When the device starts there is no history, but we can assume that the last frequency was the same as the initial frequency (which is also used in 'previous_freq'). The log shows the result of this misinterpreted value. [ 2.042847] ... Failed to get voltage for frequency 0: -34 Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>Looks good to me, Reviewed-by: Javi Merino <redacted>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> This is going to be sent for rcX along with other fixes. Anyway, I don't see a device driver that has the issue you've mentioned. Could you please tell me which device driver is having this issue?
quoted
--- drivers/devfreq/devfreq.c | 1 + 1 file changed, 1 insertion(+)diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 984c5e9..a3f2c3b 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c@@ -515,6 +515,7 @@ struct devfreq *devfreq_add_device(struct device *dev, devfreq->profile = profile; strncpy(devfreq->governor_name, governor_name, DEVFREQ_NAME_LEN); devfreq->previous_freq = profile->initial_freq; + devfreq->last_status.current_frequency = profile->initial_freq; devfreq->data = data; devfreq->nb.notifier_call = devfreq_notifier_call; --1.9.1-- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
-- MyungJoo Ham, Ph.D. Frontier CS Lab, S/W Center, Samsung Electronics