PM / devfreq: rockchip_dmc: Add rockchip_simple_ondemand_data

Add a new struct rockchip_simple_ondemand_data so that rockchip_dmc.c
does not need to depend on CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND.

Change-Id: Iafe7ec8bbc9a36aaf3dffbe669a8ee927f45d3a1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
This commit is contained in:
Finley Xiao
2021-08-23 15:12:49 +08:00
parent e649ca006e
commit 232af002ef

View File

@@ -121,10 +121,15 @@ struct share_params {
static struct share_params *ddr_psci_param;
struct rockchip_dmcfreq_ondemand_data {
unsigned int upthreshold;
unsigned int downdifferential;
};
struct rockchip_dmcfreq {
struct device *dev;
struct devfreq *devfreq;
struct devfreq_simple_ondemand_data ondemand_data;
struct rockchip_dmcfreq_ondemand_data ondemand_data;
struct clk *dmc_clk;
struct devfreq_event_dev **edev;
struct mutex lock; /* serializes access to video_info_list */
@@ -2552,7 +2557,7 @@ static int devfreq_dmc_ondemand_func(struct devfreq *df,
struct devfreq_dev_status *stat;
unsigned long long a, b;
struct rockchip_dmcfreq *dmcfreq = dev_get_drvdata(df->dev.parent);
struct devfreq_simple_ondemand_data *data = &dmcfreq->ondemand_data;
struct rockchip_dmcfreq_ondemand_data *data = &dmcfreq->ondemand_data;
unsigned int upthreshold = data->upthreshold;
unsigned int downdifferential = data->downdifferential;
unsigned long target_freq = 0;