#include <linux/device.h>
#include <linux/clk-provider.h>
+#define ARM_DVFS_CH 0
+#define GPU_DVFS_CH 1
+#define LOG_DVFS_CH 2
+
struct dvfs_node;
typedef int (*dvfs_set_rate_callback)(struct dvfs_node *clk_dvfs_node, unsigned long rate);
typedef int (*clk_set_rate_callback)(struct clk *clk, unsigned long rate);
unsigned int regu_mode;
};
+struct pvtm_info {
+ const char *compatible;
+ struct cpufreq_frequency_table *pvtm_table;
+ int channel;
+ int process_version;
+ int scan_rate_hz;
+ int sample_time_us;
+ int volt_step_uv;
+ int delta_pvtm_by_volt;
+ int delta_pvtm_by_temp;
+ int volt_margin_uv;
+ int min_volt_uv;
+ int max_volt_uv;
+ int cluster;
+};
+
+struct lkg_adjust_volt_table {
+ int lkg;
+ int dlt_volt;
+};
+
+struct lkg_info {
+ int def_table_lkg;
+ int min_adjust_freq;
+ struct lkg_adjust_volt_table *table;
+};
+
/**
* struct dvfs_node: To Store All dvfs clocks' info
* @name: Dvfs clock's Name
int set_volt; //MV
int enable_count;
int freq_limit_en; //sign if use limit frequency
+ int support_pvtm;
unsigned int min_rate; //limit min frequency
unsigned int max_rate; //limit max frequency
unsigned long last_set_rate;
+ unsigned int channel;
unsigned int temp_channel;
unsigned long temp_limit_rate;
+ unsigned int target_temp;
+ unsigned int temp_limit_enable;
+ unsigned int min_temp_limit;
+ int old_temp;
struct clk *clk;
struct pd_node *pd;
struct vd_node *vd;
struct list_head node;
struct notifier_block *dvfs_nb;
struct cpufreq_frequency_table *dvfs_table;
+ struct cpufreq_frequency_table *pvtm_table;
struct cpufreq_frequency_table *per_temp_limit_table;
struct cpufreq_frequency_table *nor_temp_limit_table;
+ struct cpufreq_frequency_table *virt_temp_limit_table[4];
clk_set_rate_callback clk_dvfs_target;
struct cpufreq_frequency_table *regu_mode_table;
int regu_mode_en;
unsigned int regu_mode;
+ struct pvtm_info *pvtm_info;
+ int lkg_adjust_volt_en;
+ struct lkg_info lkg_info;
+ unsigned int cluster;
+ unsigned int max_limit_freq;
+ unsigned int pvtm_min_temp;
};