From 10ebd8556b7990499c896a550e3d416b444211e6 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Fri, 10 May 2024 02:23:07 +0000
Subject: [PATCH] add led
---
kernel/include/soc/rockchip/rockchip_opp_select.h | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/kernel/include/soc/rockchip/rockchip_opp_select.h b/kernel/include/soc/rockchip/rockchip_opp_select.h
index 2277fbe..e7669f2 100644
--- a/kernel/include/soc/rockchip/rockchip_opp_select.h
+++ b/kernel/include/soc/rockchip/rockchip_opp_select.h
@@ -78,6 +78,8 @@
u32 low_rm;
u32 current_rm;
u32 target_rm;
+ u32 pvtpll_clk_id;
+ bool pvtpll_low_temp;
};
#if IS_ENABLED(CONFIG_ROCKCHIP_OPP)
@@ -87,8 +89,9 @@
int *volt_sel, int *scale_sel);
void rockchip_pvtpll_calibrate_opp(struct rockchip_opp_info *info);
void rockchip_pvtpll_add_length(struct rockchip_opp_info *info);
+void rockchip_init_pvtpll_table(struct rockchip_opp_info *info, int bin);
void rockchip_of_get_pvtm_sel(struct device *dev, struct device_node *np,
- char *reg_name, int process,
+ char *reg_name, int bin, int process,
int *volt_sel, int *scale_sel);
void rockchip_of_get_bin_sel(struct device *dev, struct device_node *np,
int bin, int *scale_sel);
@@ -102,11 +105,16 @@
char *porp_name, struct volt_rm_table **table);
void rockchip_get_opp_data(const struct of_device_id *matches,
struct rockchip_opp_info *info);
+int rockchip_get_soc_info(struct device *dev, struct device_node *np, int *bin,
+ int *process);
void rockchip_get_scale_volt_sel(struct device *dev, char *lkg_name,
char *reg_name, int bin, int process,
int *scale, int *volt_sel);
struct opp_table *rockchip_set_opp_prop_name(struct device *dev, int process,
int volt_sel);
+struct opp_table *rockchip_set_opp_supported_hw(struct device *dev,
+ struct device_node *np,
+ int bin, int volt_sel);
int rockchip_adjust_power_scale(struct device *dev, int scale);
int rockchip_get_read_margin(struct device *dev,
struct rockchip_opp_info *opp_info,
@@ -125,6 +133,8 @@
int rockchip_init_opp_table(struct device *dev,
struct rockchip_opp_info *info,
char *lkg_name, char *reg_name);
+void rockchip_uninit_opp_table(struct device *dev,
+ struct rockchip_opp_info *info);
#else
static inline int rockchip_of_get_leakage(struct device *dev, char *lkg_name,
int *leakage)
@@ -147,9 +157,14 @@
{
}
+static inline void rockchip_init_pvtpll_table(struct rockchip_opp_info *info,
+ int bin)
+{
+}
+
static inline void rockchip_of_get_pvtm_sel(struct device *dev,
struct device_node *np,
- char *reg_name, int process,
+ char *reg_name, int bin, int process,
int *volt_sel, int *scale_sel)
{
}
@@ -191,6 +206,12 @@
struct rockchip_opp_info *info)
{
}
+static inline int rockchip_get_soc_info(struct device *dev,
+ struct device_node *np, int *bin,
+ int *process)
+{
+ return -EOPNOTSUPP;
+}
static inline void rockchip_get_scale_volt_sel(struct device *dev,
char *lkg_name, char *reg_name,
@@ -202,6 +223,13 @@
static inline struct opp_table *rockchip_set_opp_prop_name(struct device *dev,
int process,
int volt_sel)
+{
+ return ERR_PTR(-EOPNOTSUPP);
+}
+
+static inline struct opp_table *rockchip_set_opp_supported_hw(struct device *dev,
+ struct device_node *np,
+ int bin, int volt_sel)
{
return ERR_PTR(-EOPNOTSUPP);
}
@@ -248,6 +276,11 @@
return -EOPNOTSUPP;
}
+static inline void rockchip_uninit_opp_table(struct device *dev,
+ struct rockchip_opp_info *info)
+{
+}
+
#endif /* CONFIG_ROCKCHIP_OPP */
#endif
--
Gitblit v1.6.2