hal-power-interface-1: Update comment for HAL-ACR 24/315724/1 accepted/tizen/9.0/unified/20241205.174738
authorUnsung Lee <unsung.lee@samsung.com>
Thu, 28 Nov 2024 04:39:21 +0000 (13:39 +0900)
committerUnsung Lee <unsung.lee@samsung.com>
Wed, 4 Dec 2024 08:19:29 +0000 (17:19 +0900)
Update comment format according to the guidelines for HAL-ACR

Change-Id: I678df4405226200a3b26deca8914a01810498b18
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
doc/hal_power_doc.h
include/hal-power-interface-1.h

index 961c7d5da396be7c09250f394ae55ed8c65796f0..25f280c1fbcefb22f51c9dc707c452119b0a91fb 100644 (file)
@@ -25,7 +25,7 @@
 
 /**
  * @defgroup HALAPI_HAL_POWER_MODULE Power
- * @brief The @ref CAPI_HAL_POWER_MODULE provides functions for getting and setting hardware information.
+ * @brief The @ref HALAPI_HAL_POWER_MODULE provides functions for getting and setting hardware information.
  *
  * @section HALAPI_HAL_POWER_MODULE_HEADER Required Header
  *   \#include <hal-power.h>
index 73f99f5e977e5fc06c565e86decc8973f0708b2a..f845f5313fd4a37957bc38ef3ad64fb00f35c723 100644 (file)
@@ -31,142 +31,129 @@ extern "C" {
  */
 
 /**
- * @brief Structure for power functions.
+ * @brief Structure for DVFS (Dynamic Volt. & Freq. Scaling) operations.
  * @since HAL_MODULE_POWER 1.0
  */
-
-/*
- * Define the ops (operations) structure which are used on specific resource.
- */
 struct pass_resource_dvfs_ops {
-       /* Get and set the current governor. */
-       int (*get_curr_governor)(char *res_name, char *governor);
-       int (*set_curr_governor)(char *res_name, char *governor);
+       int (*get_curr_governor)(char *res_name, char *governor); /**< Get the current governor */
+       int (*set_curr_governor)(char *res_name, char *governor); /**< Set the current governor */
 
-       int (*get_avail_governor)(char *res_name, char **avail_governor);
+       int (*get_avail_governor)(char *res_name, char **avail_governor); /**< Get the available governor */
 
-       /* Get the current frequency. */
-       int (*get_curr_freq)(char *res_name);
+       int (*get_curr_freq)(char *res_name); /**< Get the current frequency */
 
-       /* Get and set the minimum frequency. */
-       int (*get_min_freq)(char *res_name);
-       int (*set_min_freq)(char *res_name, int freq);
+       int (*get_min_freq)(char *res_name); /**< Get the minimum frequency */
+       int (*set_min_freq)(char *res_name, int freq); /**< Set the minimum frequency */
 
-       /* Get and set the maximum frequency. */
-       int (*get_max_freq)(char *res_name);
-       int (*set_max_freq)(char *res_name, int freq);
+       int (*get_max_freq)(char *res_name); /**< Get the maximum frequency */
+       int (*set_max_freq)(char *res_name, int freq); /**< Set the maximum frequency */
 
-       /* Get the minimum/maximum frequency which can be set to resource. */
-       int (*get_available_min_freq)(char *res_name);
-       int (*get_available_max_freq)(char *res_name);
+       int (*get_available_min_freq)(char *res_name); /**< Get the minimum frequency which can be set to resource */
+       int (*get_available_max_freq)(char *res_name); /**< Get the maxinum frequency which can be set to resource */
 
-       /* Get and set the up_threshold to support boosting. */
-       int (*get_up_threshold)(char *res_name);
-       int (*set_up_threshold)(char *res_name, int up_threshold);
+       int (*get_up_threshold)(char *res_name); /**< Get the up_threshold to support boosting */
+       int (*set_up_threshold)(char *res_name, int up_threshold); /**< Set the up_threshold to support boosting */
 
-       /* Get the load_table of each resource to estimate the system load. */
-       int (*get_load_table)(char *name, void *pass_cpu_load_table);
+       int (*get_load_table)(char *name, void *pass_cpu_load_table); /**< Get the load_table of each resource to estimate the system load */
 };
 
+/**
+ * @brief Structure for CPU hotplug operations.
+ * @since HAL_MODULE_POWER 1.0
+ */
 struct pass_resource_hotplug_ops {
-       /* Get and set the online status of resource. */
-       int (*get_online_state)(char *res_name, int cpu);
-       int (*set_online_state)(char *res_name, int cpu, int on);
-       /* Get and set the minimum number of online CPUs */
-       int (*get_online_min_num) (char *res_name);
-       int (*set_online_min_num) (char *res_name, int min_num);
-       /* Get and set the maximum number of online CPUs */
-       int (*get_online_max_num) (char *res_name);
-       int (*set_online_max_num) (char *res_name, int max_num);
+       int (*get_online_state)(char *res_name, int cpu); /**< Get the online status of resource */
+       int (*set_online_state)(char *res_name, int cpu, int on); /**< Set the online status of resource */
+       int (*get_online_min_num) (char *res_name); /* Get the minimum number of online CPUs */
+       int (*set_online_min_num) (char *res_name, int min_num); /* Set the minimum number of online CPUs */
+       int (*get_online_max_num) (char *res_name); /**< Get the maximum number of online CPUs */
+       int (*set_online_max_num) (char *res_name, int max_num); /**< Set the maximum number of online CPUs */
 };
 
+/**
+ * @brief Structure for TMU (Thermal Management Unit) operations.
+ * @since HAL_MODULE_POWER 1.0
+ */
 struct pass_resource_tmu_ops {
-       /* Get the current temperature of resource. */
-       int (*get_temp)(char *res_thermal_name);
+       int (*get_temp)(char *res_thermal_name); /**< Get the current temperature of resource */
 
-       /* Get the policy of thermal management unit. */
-       int (*get_policy)(char *res_thermal_name, char *policy);
+       int (*get_policy)(char *res_thermal_name, char *policy); /**< Get the policy of thermal management unit */
 
-       /* Get and set the state of thermal cooling-device */
-       int (*set_cooling_device_state)(char *coolign_device_name, int state);
-       int (*get_cooling_device_state)(char *cooling_device_name);
+       int (*set_cooling_device_state)(char *coolign_device_name, int state); /**< Set the state of thermal cooling-device */
+       int (*get_cooling_device_state)(char *cooling_device_name); /**< Get the state of thermal cooling-device */
 
-       /* Get the maximum state of thermal cooling-device */
-       int (*get_cooling_device_max_state)(char *cooling_device_name);
+       int (*get_cooling_device_max_state)(char *cooling_device_name); /**< Get the maximum state of thermal cooling-device */
 };
 
+/**
+ * @brief Structure for battery operations.
+ * @since HAL_MODULE_POWER 1.0
+ */
 struct pass_resource_battery_ops {
-       /* Get and set the state of batterh charging */
-       int (*set_charging_status)(char *res_name, int state);
-       int (*get_charging_status)(char *res_name);
+       int (*set_charging_status)(char *res_name, int state); /**< Set the state of batterh charging */
+       int (*get_charging_status)(char *res_name); /**< Get the state of batterh charging */
 
-       /* Get and set the battery charging current (unit: uA) */
-       int (*set_charging_current)(char *res_name, int charing_current_uA);
-       int (*get_charging_current)(char *res_name);
+       int (*set_charging_current)(char *res_name, int charing_current_uA); /**< Set the battery charging current (unit: uA) */
+       int (*get_charging_current)(char *res_name); /**< Get the battery charging current (unit: uA) */
 };
 
-/*
- * Define the resource structure for CPU H/W.
- *
- * @dvfs       : function lists for the DVFS (Dynamic Volt. & Freq. Scaling).
- * @tmu                : function lists for the TMU (Thermal Management Unit).
- * @hotplug    : function lists for the CPU on/off.
+/**
+ * @brief Structure for CPU H/W.
+ * @since HAL_MODULE_POWER 1.0
  */
 struct pass_resource_cpu {
-       struct pass_resource_dvfs_ops dvfs;
-       struct pass_resource_tmu_ops tmu;
-       struct pass_resource_hotplug_ops hotplug;
+       struct pass_resource_dvfs_ops dvfs; /**< Function lists for DVFS (Dynamic Volt. & Freq. Scaling) */
+       struct pass_resource_tmu_ops tmu; /**< Function lists for function lists for the TMU (Thermal Management Unit) */
+       struct pass_resource_hotplug_ops hotplug; /**< Function lists for the CPU on/off */
 };
 
-/*
- * Define the resource structure for Memory Bus H/W.
- *
- * @dvfs       : function lists for the DVFS (Dynamic Volt. & Freq. Scaling).
- * @tmu                : function lists for the TMU (Thermal Management Unit).
+/**
+ * @brief Structure for Memory Bus H/W.
+ * @since HAL_MODULE_POWER 1.0
  */
 struct pass_resource_bus {
-       struct pass_resource_dvfs_ops dvfs;
-       struct pass_resource_tmu_ops tmu;
+       struct pass_resource_dvfs_ops dvfs; /**< Function lists for DVFS (Dynamic Volt. & Freq. Scaling) */
+       struct pass_resource_tmu_ops tmu; /**< Function lists for function lists for the TMU (Thermal Management Unit) */
+
 };
 
-/*
- * Define the resource structure for GPU H/W.
- *
- * @dvfs       : function lists for the DVFS (Dynamic Volt. & Freq. Scaling).
- * @tmu                : function lists for the TMU (Thermal Management Unit).
+/**
+ * @brief Structure for GPU H/W.
+ * @since HAL_MODULE_POWER 1.0
  */
 struct pass_resource_gpu {
-       struct pass_resource_dvfs_ops dvfs;
-       struct pass_resource_tmu_ops tmu;
+       struct pass_resource_dvfs_ops dvfs; /**< Function lists for DVFS (Dynamic Volt. & Freq. Scaling) */
+       struct pass_resource_tmu_ops tmu; /**< Function lists for function lists for the TMU (Thermal Management Unit) */
 };
 
-/*
- * Define the resource structure for Memory H/W.
- *
+/**
+ * @brief Structure for Memory H/W.
+ * @since HAL_MODULE_POWER 1.0
  */
 struct pass_resource_memory {
-       /* Get and set the /sys/kernel/debug/fault_around_bytes */
-       int (*get_fault_around_bytes)(char *res_name);
-       int (*set_fault_around_bytes)(char *res_name, int fault_around_bytes);
+       int (*get_fault_around_bytes)(char *res_name); /**< Get the /sys/kernel/debug/fault_around_bytes */
+       int (*set_fault_around_bytes)(char *res_name, int fault_around_bytes); /**< Set the /sys/kernel/debug/fault_around_bytes */
 };
 
-/*
- * Define the resource structure for Battery H/W.
- *
- * @tmu                : function lists for the TMU (Thermal Management Unit).
- * @battery    : function lists for the battery charging.
+/**
+ * @brief Structure for Battery H/W.
+ * @since HAL_MODULE_POWER 1.0
  */
 struct pass_resource_battery {
-       struct pass_resource_tmu_ops tmu;
-       struct pass_resource_battery_ops battery;
+       struct pass_resource_tmu_ops tmu; /**< Function lists for thermal management unit */
+       struct pass_resource_battery_ops battery; /**< Function lists for battery */
 };
 
+/**
+ * @brief Structure for power functions.
+ * @since HAL_MODULE_POWER 1.0
+ */
 typedef struct _hal_backend_power_funcs {
-       struct pass_resource_cpu *cpu;
-       struct pass_resource_bus *bus;
-       struct pass_resource_gpu *gpu;
-       struct pass_resource_memory *memory;
-       struct pass_resource_battery *battery;
+       struct pass_resource_cpu *cpu; /**< Function lists for CPU */
+       struct pass_resource_bus *bus; /**< Function lists for bus */
+       struct pass_resource_gpu *gpu; /**< Function lists for GPU */
+       struct pass_resource_memory *memory; /**< Function lists for memory */
+       struct pass_resource_battery *battery; /**< Function lists for battery */
 } hal_backend_power_funcs;
 
 /**