mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
MALI: midgard: Linux: support custom ondemand_data
get parameter from dts Change-Id: Id1b11e3d6a5809cbd4f6f52b1595562e0fa66f70 Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
This commit is contained in:
@@ -223,8 +223,14 @@ int kbase_devfreq_init(struct kbase_device *kbdev)
|
||||
if (kbase_devfreq_init_freq_table(kbdev, dp))
|
||||
return -EFAULT;
|
||||
|
||||
of_property_read_u32(kbdev->dev->of_node, "upthreshold",
|
||||
&kbdev->ondemand_data.upthreshold);
|
||||
of_property_read_u32(kbdev->dev->of_node, "downdifferential",
|
||||
&kbdev->ondemand_data.downdifferential);
|
||||
|
||||
kbdev->devfreq = devfreq_add_device(kbdev->dev, dp,
|
||||
"simple_ondemand", NULL);
|
||||
"simple_ondemand",
|
||||
&kbdev->ondemand_data);
|
||||
if (IS_ERR(kbdev->devfreq)) {
|
||||
kbase_devfreq_term_freq_table(kbdev);
|
||||
return PTR_ERR(kbdev->devfreq);
|
||||
|
||||
@@ -1035,6 +1035,7 @@ struct kbase_device {
|
||||
struct devfreq *devfreq;
|
||||
unsigned long current_freq;
|
||||
unsigned long current_voltage;
|
||||
struct devfreq_simple_ondemand_data ondemand_data;
|
||||
#ifdef CONFIG_DEVFREQ_THERMAL
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0)
|
||||
struct devfreq_cooling_device *devfreq_cooling;
|
||||
|
||||
Reference in New Issue
Block a user