devfreq: Allow bw_hwmon resume with zero resume freq

Currently bw_hwmon governor does not allow the device
to be resume if the resume_freq is set to zero. But there
can be devices that vote for zero frequency when there is
no bandwidth on the device. This does not mean that the device
should not be resume from suspend. Remove the check with prevents
resume, instead add a check in the devfreq framework to check if
device is suspended or not before calling the governor resume.

Change-Id: Ib82a6a36308aee52e8bb989fddca92265de6c4a4
Signed-off-by: Rama Aparna Mallavarapu <aparnam@codeaurora.org>
[avajid@codeaurora.org: removed suspended check in devfreq framework]
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
This commit is contained in:
Rama Aparna Mallavarapu 2019-09-17 15:40:55 -07:00 • committed by Amir Vajid
commit 6b1a168b7e

View file

@ -675,11 +675,6 @@ static int gov_resume(struct devfreq *df)
if (!node->hw->resume_hwmon)
return -EPERM;
if (!node->resume_freq) {
dev_warn(df->dev.parent, "Governor already resumed!\n");
return -EBUSY;
}
mutex_lock(&df->lock);
update_devfreq(df);
mutex_unlock(&df->lock);