*/
/**
- * @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;
/**