Commit 3a1ec2e8 authored by Chanwoo Choi's avatar Chanwoo Choi

PM / devfreq: Change to DEVFREQ_GOV_UPDATE_INTERVAL event name

DEVFREQ_GOV_INTERVAL event indicates that update the interval
for polling mode of devfreq device. But, this event name doesn't
specify exactly what to do.

Change DEVFREQ_GOV_INTERVAL event name to DEVFREQ_GOV_UPDATE_INTERVAL
which specifies what to do by event name.

And modify the function name to DEVFREQ_GOV_UPDATE_INTERVAL
with 'devfreq_' prefix + verb + object as following:
- devfreq_interval_update -> devfreq_updatee_interval
Reviewed-by: default avatarLukasz Luba <lukasz.luba@arm.com>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 6d743493
...@@ -550,14 +550,14 @@ void devfreq_monitor_resume(struct devfreq *devfreq) ...@@ -550,14 +550,14 @@ void devfreq_monitor_resume(struct devfreq *devfreq)
EXPORT_SYMBOL(devfreq_monitor_resume); EXPORT_SYMBOL(devfreq_monitor_resume);
/** /**
* devfreq_interval_update() - Update device devfreq monitoring interval * devfreq_update_interval() - Update device devfreq monitoring interval
* @devfreq: the devfreq instance. * @devfreq: the devfreq instance.
* @delay: new polling interval to be set. * @delay: new polling interval to be set.
* *
* Helper function to set new load monitoring polling interval. Function * Helper function to set new load monitoring polling interval. Function
* to be called from governor in response to DEVFREQ_GOV_INTERVAL event. * to be called from governor in response to DEVFREQ_GOV_UPDATE_INTERVAL event.
*/ */
void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay) void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay)
{ {
unsigned int cur_delay = devfreq->profile->polling_ms; unsigned int cur_delay = devfreq->profile->polling_ms;
unsigned int new_delay = *delay; unsigned int new_delay = *delay;
...@@ -597,7 +597,7 @@ void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay) ...@@ -597,7 +597,7 @@ void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay)
out: out:
mutex_unlock(&devfreq->lock); mutex_unlock(&devfreq->lock);
} }
EXPORT_SYMBOL(devfreq_interval_update); EXPORT_SYMBOL(devfreq_update_interval);
/** /**
* devfreq_notifier_call() - Notify that the device frequency requirements * devfreq_notifier_call() - Notify that the device frequency requirements
...@@ -1424,7 +1424,7 @@ static ssize_t polling_interval_store(struct device *dev, ...@@ -1424,7 +1424,7 @@ static ssize_t polling_interval_store(struct device *dev,
if (ret != 1) if (ret != 1)
return -EINVAL; return -EINVAL;
df->governor->event_handler(df, DEVFREQ_GOV_INTERVAL, &value); df->governor->event_handler(df, DEVFREQ_GOV_UPDATE_INTERVAL, &value);
ret = count; ret = count;
return ret; return ret;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
/* Devfreq events */ /* Devfreq events */
#define DEVFREQ_GOV_START 0x1 #define DEVFREQ_GOV_START 0x1
#define DEVFREQ_GOV_STOP 0x2 #define DEVFREQ_GOV_STOP 0x2
#define DEVFREQ_GOV_INTERVAL 0x3 #define DEVFREQ_GOV_UPDATE_INTERVAL 0x3
#define DEVFREQ_GOV_SUSPEND 0x4 #define DEVFREQ_GOV_SUSPEND 0x4
#define DEVFREQ_GOV_RESUME 0x5 #define DEVFREQ_GOV_RESUME 0x5
...@@ -61,7 +61,7 @@ void devfreq_monitor_start(struct devfreq *devfreq); ...@@ -61,7 +61,7 @@ void devfreq_monitor_start(struct devfreq *devfreq);
void devfreq_monitor_stop(struct devfreq *devfreq); void devfreq_monitor_stop(struct devfreq *devfreq);
void devfreq_monitor_suspend(struct devfreq *devfreq); void devfreq_monitor_suspend(struct devfreq *devfreq);
void devfreq_monitor_resume(struct devfreq *devfreq); void devfreq_monitor_resume(struct devfreq *devfreq);
void devfreq_interval_update(struct devfreq *devfreq, unsigned int *delay); void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay);
int devfreq_add_governor(struct devfreq_governor *governor); int devfreq_add_governor(struct devfreq_governor *governor);
int devfreq_remove_governor(struct devfreq_governor *governor); int devfreq_remove_governor(struct devfreq_governor *governor);
......
...@@ -96,8 +96,8 @@ static int devfreq_simple_ondemand_handler(struct devfreq *devfreq, ...@@ -96,8 +96,8 @@ static int devfreq_simple_ondemand_handler(struct devfreq *devfreq,
devfreq_monitor_stop(devfreq); devfreq_monitor_stop(devfreq);
break; break;
case DEVFREQ_GOV_INTERVAL: case DEVFREQ_GOV_UPDATE_INTERVAL:
devfreq_interval_update(devfreq, (unsigned int *)data); devfreq_update_interval(devfreq, (unsigned int *)data);
break; break;
case DEVFREQ_GOV_SUSPEND: case DEVFREQ_GOV_SUSPEND:
......
...@@ -734,7 +734,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq, ...@@ -734,7 +734,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq,
devfreq_monitor_stop(devfreq); devfreq_monitor_stop(devfreq);
break; break;
case DEVFREQ_GOV_INTERVAL: case DEVFREQ_GOV_UPDATE_INTERVAL:
/* /*
* ACTMON hardware supports up to 256 milliseconds for the * ACTMON hardware supports up to 256 milliseconds for the
* sampling period. * sampling period.
...@@ -745,7 +745,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq, ...@@ -745,7 +745,7 @@ static int tegra_governor_event_handler(struct devfreq *devfreq,
} }
tegra_actmon_pause(tegra); tegra_actmon_pause(tegra);
devfreq_interval_update(devfreq, new_delay); devfreq_update_interval(devfreq, new_delay);
ret = tegra_actmon_resume(tegra); ret = tegra_actmon_resume(tegra);
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment