aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2018-05-09 12:52:06 -0400
committerSudeep Holla <sudeep.holla@arm.com>2018-05-10 05:49:40 -0400
commit7859e08c1bdef00841d29e8ff320264fd6f9257b (patch)
tree35e8ca858818b06941fd0fa1c481d84e5de91ff5
parent1baf47c2e5c946fd17ef07597b9d25722d13ff14 (diff)
firmware: arm_scmi: rename get_transition_latency and add_opps_to_device
Most of the scmi code follows the suggestion from Greg KH on a totally different thread[0] to have the subsystem name first, followed by the noun and finally the verb with couple of these exceptions. This patch fixes them so that all the functions names are aligned to that practice. [0] https://www.spinics.net/lists/arm-kernel/msg583673.html Acked-by: Rafael J. Wysocki <rafael@kernel.org> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
-rw-r--r--drivers/cpufreq/scmi-cpufreq.c4
-rw-r--r--drivers/firmware/arm_scmi/perf.c10
-rw-r--r--include/linux/scmi_protocol.h10
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index b4dbc77459b6..50b1551ba894 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -117,7 +117,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
117 return -ENODEV; 117 return -ENODEV;
118 } 118 }
119 119
120 ret = handle->perf_ops->add_opps_to_device(handle, cpu_dev); 120 ret = handle->perf_ops->device_opps_add(handle, cpu_dev);
121 if (ret) { 121 if (ret) {
122 dev_warn(cpu_dev, "failed to add opps to the device\n"); 122 dev_warn(cpu_dev, "failed to add opps to the device\n");
123 return ret; 123 return ret;
@@ -164,7 +164,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
164 /* SCMI allows DVFS request for any domain from any CPU */ 164 /* SCMI allows DVFS request for any domain from any CPU */
165 policy->dvfs_possible_from_any_cpu = true; 165 policy->dvfs_possible_from_any_cpu = true;
166 166
167 latency = handle->perf_ops->get_transition_latency(handle, cpu_dev); 167 latency = handle->perf_ops->transition_latency_get(handle, cpu_dev);
168 if (!latency) 168 if (!latency)
169 latency = CPUFREQ_ETERNAL; 169 latency = CPUFREQ_ETERNAL;
170 170
diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c
index 987c64d19801..611ab08e6174 100644
--- a/drivers/firmware/arm_scmi/perf.c
+++ b/drivers/firmware/arm_scmi/perf.c
@@ -349,8 +349,8 @@ static int scmi_dev_domain_id(struct device *dev)
349 return clkspec.args[0]; 349 return clkspec.args[0];
350} 350}
351 351
352static int scmi_dvfs_add_opps_to_device(const struct scmi_handle *handle, 352static int scmi_dvfs_device_opps_add(const struct scmi_handle *handle,
353 struct device *dev) 353 struct device *dev)
354{ 354{
355 int idx, ret, domain; 355 int idx, ret, domain;
356 unsigned long freq; 356 unsigned long freq;
@@ -383,7 +383,7 @@ static int scmi_dvfs_add_opps_to_device(const struct scmi_handle *handle,
383 return 0; 383 return 0;
384} 384}
385 385
386static int scmi_dvfs_get_transition_latency(const struct scmi_handle *handle, 386static int scmi_dvfs_transition_latency_get(const struct scmi_handle *handle,
387 struct device *dev) 387 struct device *dev)
388{ 388{
389 struct perf_dom_info *dom; 389 struct perf_dom_info *dom;
@@ -432,8 +432,8 @@ static struct scmi_perf_ops perf_ops = {
432 .level_set = scmi_perf_level_set, 432 .level_set = scmi_perf_level_set,
433 .level_get = scmi_perf_level_get, 433 .level_get = scmi_perf_level_get,
434 .device_domain_id = scmi_dev_domain_id, 434 .device_domain_id = scmi_dev_domain_id,
435 .get_transition_latency = scmi_dvfs_get_transition_latency, 435 .transition_latency_get = scmi_dvfs_transition_latency_get,
436 .add_opps_to_device = scmi_dvfs_add_opps_to_device, 436 .device_opps_add = scmi_dvfs_device_opps_add,
437 .freq_set = scmi_dvfs_freq_set, 437 .freq_set = scmi_dvfs_freq_set,
438 .freq_get = scmi_dvfs_freq_get, 438 .freq_get = scmi_dvfs_freq_get,
439}; 439};
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index a171c1e293e8..f4c9fc0fc755 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -85,8 +85,8 @@ struct scmi_clk_ops {
85 * @level_set: sets the performance level of a domain 85 * @level_set: sets the performance level of a domain
86 * @level_get: gets the performance level of a domain 86 * @level_get: gets the performance level of a domain
87 * @device_domain_id: gets the scmi domain id for a given device 87 * @device_domain_id: gets the scmi domain id for a given device
88 * @get_transition_latency: gets the DVFS transition latency for a given device 88 * @transition_latency_get: gets the DVFS transition latency for a given device
89 * @add_opps_to_device: adds all the OPPs for a given device 89 * @device_opps_add: adds all the OPPs for a given device
90 * @freq_set: sets the frequency for a given device using sustained frequency 90 * @freq_set: sets the frequency for a given device using sustained frequency
91 * to sustained performance level mapping 91 * to sustained performance level mapping
92 * @freq_get: gets the frequency for a given device using sustained frequency 92 * @freq_get: gets the frequency for a given device using sustained frequency
@@ -102,10 +102,10 @@ struct scmi_perf_ops {
102 int (*level_get)(const struct scmi_handle *handle, u32 domain, 102 int (*level_get)(const struct scmi_handle *handle, u32 domain,
103 u32 *level, bool poll); 103 u32 *level, bool poll);
104 int (*device_domain_id)(struct device *dev); 104 int (*device_domain_id)(struct device *dev);
105 int (*get_transition_latency)(const struct scmi_handle *handle, 105 int (*transition_latency_get)(const struct scmi_handle *handle,
106 struct device *dev); 106 struct device *dev);
107 int (*add_opps_to_device)(const struct scmi_handle *handle, 107 int (*device_opps_add)(const struct scmi_handle *handle,
108 struct device *dev); 108 struct device *dev);
109 int (*freq_set)(const struct scmi_handle *handle, u32 domain, 109 int (*freq_set)(const struct scmi_handle *handle, u32 domain,
110 unsigned long rate, bool poll); 110 unsigned long rate, bool poll);
111 int (*freq_get)(const struct scmi_handle *handle, u32 domain, 111 int (*freq_get)(const struct scmi_handle *handle, u32 domain,