#include <stdio.h>
#include <stdint.h>
+#include <stdbool.h>
#define BUFF_MAX 255
#define PASS_RESOURCE_CPU_ID 1
#define PASS_RESOURCE_BUS_ID 2
#define PASS_RESOURCE_GPU_ID 3
+#define PASS_RESOURCE_NONSTANDARD_ID 99
#define PASS_RESOURCE_CPU_NAME "cpu"
#define PASS_RESOURCE_BUS_NAME "bus"
#define PASS_RESOURCE_GPU_NAME "gpu"
+#define PASS_RESOURCE_NONSTANDARD_NAME "nonstandard"
/**
* Define the common structure
* - PASS_RESOURCE_CPU_ID
* - PASS_RESOURCE_BUS_ID
* - PASS_RESOURCE_GPU_ID
+ * - PASS_RESOURCE_NONSTANDARD_ID
* @name : device name, can have the following value.
* - PASS_RESOURCE_CPU_NAME
* - PASS_RESOURCE_BUS_NAME
* - PASS_RESOURCE_GPU_NAME
+ * - PASS_RESOURCE_NONSTANDARD_NAME
* @author : author name
* @dso : module's dso
* @resourced[] : reserved for future use
struct pass_resource_tmu_ops tmu;
};
+/*
+ * Define the resource structure for nonstandard H/W.
+ *
+ * Following function is Deprecated. (Not recommended for use)
+ * @set_pmqos_data : function to bypass the scenario data to HAL.
+ *
+ * This structure indicates the nonstandard H/W which doesn't have
+ * the official supported framework (e.g., cpufreq, devfreq and so on)
+ * in Linux Kernel. But, the specific device might be controlled
+ * according to PMQoS scenario or other cases.
+ */
+struct pass_resource_nonstandard {
+ struct pass_resource_common common;
+
+ /*
+ * NOTE: It is not propper method. But PASS must need to keep
+ * the backwards compatibility, set the PMQoS's data from
+ * platform to hal. So, It is not recommended to use it.
+ *
+ * This function will be removed after finding the proper method.
+ */
+ int (*set_pmqos_data)(char *res_name, void *data);
+};
+
int pass_get_hal_info(const char *id, const struct pass_resource_info **info);
/**