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

Commit e46bd766 authored by Rama Aparna Mallavarapu's avatar Rama Aparna Mallavarapu
Browse files

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: default avatarRama Aparna Mallavarapu <aparnam@codeaurora.org>
parent 007833ae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -859,7 +859,7 @@ int devfreq_resume_device(struct devfreq *devfreq)
		return -EINVAL;

	mutex_lock(&devfreq->event_lock);
	if (!devfreq->governor) {
	if (!devfreq->governor || !devfreq->dev_suspended) {
		mutex_unlock(&devfreq->event_lock);
		return 0;
	}
+0 −5
Original line number Diff line number Diff line
@@ -689,11 +689,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);