summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-04-17 17:12:01 +0000
committerZhang Rui <rui.zhang@intel.com>2013-04-25 00:34:38 +0800
commit2d6f28fedcd2842635a02b29e3823ba9881d5086 (patch)
treeb2b3131abad07dbadcd7ac768a898f413367b475 /drivers/thermal
parent82b9ee402fa9867edde8dbf17a55f615f80bc3ba (diff)
downloadlwn-2d6f28fedcd2842635a02b29e3823ba9881d5086.tar.gz
lwn-2d6f28fedcd2842635a02b29e3823ba9881d5086.zip
thermal: cpu_cooling: add documentation for get_property
As this is one of the central functions of this file, it deserves a proper documentation. This patch improves the existing comment to format it as a kernel-doc style. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/cpu_cooling.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
index b8b8a1ef85ed..084ef0096cc9 100644
--- a/drivers/thermal/cpu_cooling.c
+++ b/drivers/thermal/cpu_cooling.c
@@ -118,8 +118,14 @@ enum cpufreq_cooling_property {
GET_MAXL,
};
-/*
- * this is the common function to
+/**
+ * get_property - fetch a property of interest for a give cpu.
+ * @cpu: cpu for which the property is required
+ * @input: query parameter
+ * @output: query return
+ * @property: type of query (frequency, level, max level)
+ *
+ * This is the common function to
* 1. get maximum cpu cooling states
* 2. translate frequency to cooling state
* 3. translate cooling state to frequency
@@ -128,7 +134,9 @@ enum cpufreq_cooling_property {
* a) reduce duplicate code as most of the code can be shared.
* b) make sure the logic is consistent when translating between
* cooling states and frequencies.
-*/
+ *
+ * Return: 0 on success, -EINVAL when invalid parameters are passed.
+ */
static int get_property(unsigned int cpu, unsigned long input,
unsigned int* output, enum cpufreq_cooling_property property)
{