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

Commit 00fbcb68 authored by Santosh Mardi's avatar Santosh Mardi
Browse files

Revert "devfreq: Do not allow tunable updates when device is suspended"



This reverts commit efff55e2.

When device is suspended setting tunnable is not allowed,
now governor changed to handle the suspend state of device.

Allow configuring tunable when device is in suspend state,
revert changing the code which is not allowing to set tunables.

Change-Id: I32638e4e20df2b54dda00089965d6aca0af1a926
Signed-off-by: default avatarSantosh Mardi <gsantosh@codeaurora.org>
parent f8b00cea
Loading
Loading
Loading
Loading
+3 −15
Original line number Diff line number Diff line
@@ -1192,16 +1192,14 @@ static ssize_t polling_interval_store(struct device *dev,
	unsigned int value;
	int ret;

	if (!df->governor)
		return -EINVAL;

	ret = sscanf(buf, "%u", &value);
	if (ret != 1)
		return -EINVAL;

	mutex_lock(&df->event_lock);
	if (!df->governor || df->dev_suspended) {
		dev_warn(dev, "device suspended, operation not allowed\n");
		mutex_unlock(&df->event_lock);
		return -EINVAL;
	}
	df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value);
	ret = count;
	mutex_unlock(&df->event_lock);
@@ -1222,11 +1220,6 @@ static ssize_t min_freq_store(struct device *dev, struct device_attribute *attr,
		return -EINVAL;

	mutex_lock(&df->event_lock);
	if (df->dev_suspended) {
		dev_warn(dev, "device suspended, min freq not allowed\n");
		mutex_unlock(&df->event_lock);
		return -EINVAL;
	}
	mutex_lock(&df->lock);

	if (value) {
@@ -1273,11 +1266,6 @@ static ssize_t max_freq_store(struct device *dev, struct device_attribute *attr,
		return -EINVAL;

	mutex_lock(&df->event_lock);
	if (df->dev_suspended) {
		mutex_unlock(&df->event_lock);
		dev_warn(dev, "device suspended, max freq not allowed\n");
		return -EINVAL;
	}
	mutex_lock(&df->lock);

	if (value) {