mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
soc: rockchip: add CONFIG_ROCKCHIP_OPP for rockchip_opp_select.c
Change-Id: I0cde56d1ad7482c8d4e8b518fc49cc028da6501b Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
@@ -30,6 +30,13 @@ config ROCKCHIP_DEVICEINFO
|
||||
help
|
||||
Say y here if you have a deviceinfo partition.
|
||||
|
||||
config ROCKCHIP_OPP
|
||||
bool "Rockchip OPP select support"
|
||||
depends on PM_DEVFREQ
|
||||
default y
|
||||
help
|
||||
Say y here to enable rockchip OPP support.
|
||||
|
||||
config ROCKCHIP_PM_TEST
|
||||
bool "Rockchip pm_test support"
|
||||
default n
|
||||
|
||||
@@ -9,10 +9,10 @@ obj-$(CONFIG_ROCKCHIP_PM_DOMAINS) += pm_domains.o
|
||||
obj-$(CONFIG_FIQ_DEBUGGER) += rk_fiq_debugger.o
|
||||
obj-$(CONFIG_MMC_DW_ROCKCHIP) += sdmmc_vendor_storage.o
|
||||
obj-$(CONFIG_RK_FLASH) += flash_vendor_storage.o
|
||||
obj-$(CONFIG_ROCKCHIP_OPP) += rockchip_opp_select.o
|
||||
obj-$(CONFIG_ROCKCHIP_PVTM) += rockchip_pvtm.o
|
||||
obj-$(CONFIG_ROCKCHIP_SUSPEND_MODE) += rockchip_pm_config.o
|
||||
obj-$(CONFIG_ROCK_CHIP_SOC_CAMERA) += rk_camera.o
|
||||
|
||||
obj-y += rk_vendor_storage.o
|
||||
obj-y += rockchip-system-status.o
|
||||
obj-y += rockchip_opp_select.o
|
||||
|
||||
@@ -46,6 +46,7 @@ struct thermal_opp_info {
|
||||
bool is_high_temp;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ROCKCHIP_OPP
|
||||
void rockchip_of_get_lkg_sel(struct device *dev, struct device_node *np,
|
||||
char *lkg_name, int process,
|
||||
int *volt_sel, int *scale_sel);
|
||||
@@ -79,5 +80,99 @@ int rockchip_dev_low_temp_adjust(struct thermal_opp_info *info,
|
||||
bool is_low);
|
||||
int rockchip_dev_high_temp_adjust(struct thermal_opp_info *info,
|
||||
bool is_high);
|
||||
#else
|
||||
static inline void rockchip_of_get_lkg_sel(struct device *dev,
|
||||
struct device_node *np,
|
||||
char *lkg_name, int process,
|
||||
int *volt_sel, int *scale_sel)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void rockchip_of_get_pvtm_sel(struct device *dev,
|
||||
struct device_node *np,
|
||||
char *reg_name, int process,
|
||||
int *volt_sel, int *scale_sel)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void rockchip_of_get_bin_sel(struct device *dev,
|
||||
struct device_node *np, int bin,
|
||||
int *scale_sel)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int rockchip_get_efuse_value(struct device_node *np,
|
||||
char *porp_name, int *value)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline void rockchip_get_soc_info(struct device *dev,
|
||||
const struct of_device_id *matches,
|
||||
int *bin, int *process)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void rockchip_get_scale_volt_sel(struct device *dev,
|
||||
char *lkg_name, char *reg_name,
|
||||
int bin, int process, int *scale,
|
||||
int *volt_sel)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int rockchip_set_opp_info(struct device *dev, int process,
|
||||
int volt_sel)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int rockchip_adjust_power_scale(struct device *dev, int scale)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int rockchip_init_opp_table(struct device *dev,
|
||||
const struct of_device_id *matches,
|
||||
char *lkg_name, char *reg_name)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline struct thermal_opp_info *
|
||||
rockchip_register_thermal_notifier(struct device *dev,
|
||||
struct thermal_opp_device_data *data)
|
||||
{
|
||||
return ERR_PTR(-ENOTSUPP);
|
||||
}
|
||||
|
||||
static inline void
|
||||
rockchip_unregister_thermal_notifier(struct thermal_opp_info *info)
|
||||
{
|
||||
}
|
||||
|
||||
static inline int rockchip_cpu_low_temp_adjust(struct thermal_opp_info *info,
|
||||
bool is_low)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int rockchip_cpu_high_temp_adjust(struct thermal_opp_info *info,
|
||||
bool is_high)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int rockchip_dev_low_temp_adjust(struct thermal_opp_info *info,
|
||||
bool is_low)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
static inline int rockchip_dev_high_temp_adjust(struct thermal_opp_info *info,
|
||||
bool is_high)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
#endif /* CONFIG_ROCKCHIP_OPP */
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user