Home
last modified time | relevance | path

Searched refs:devfreq (Results 1 – 25 of 36) sorted by relevance

12

/Linux-v4.19/drivers/devfreq/
Ddevfreq.c56 static struct devfreq *find_device_devfreq(struct device *dev) in find_device_devfreq()
58 struct devfreq *tmp_devfreq; in find_device_devfreq()
75 static unsigned long find_available_min_freq(struct devfreq *devfreq) in find_available_min_freq() argument
80 opp = dev_pm_opp_find_freq_ceil(devfreq->dev.parent, &min_freq); in find_available_min_freq()
89 static unsigned long find_available_max_freq(struct devfreq *devfreq) in find_available_max_freq() argument
94 opp = dev_pm_opp_find_freq_floor(devfreq->dev.parent, &max_freq); in find_available_max_freq()
108 static int devfreq_get_freq_level(struct devfreq *devfreq, unsigned long freq) in devfreq_get_freq_level() argument
112 for (lev = 0; lev < devfreq->profile->max_state; lev++) in devfreq_get_freq_level()
113 if (freq == devfreq->profile->freq_table[lev]) in devfreq_get_freq_level()
119 static int set_freq_table(struct devfreq *devfreq) in set_freq_table() argument
[all …]
Dgovernor_passive.c18 static int devfreq_passive_get_target_freq(struct devfreq *devfreq, in devfreq_passive_get_target_freq() argument
22 = (struct devfreq_passive_data *)devfreq->data; in devfreq_passive_get_target_freq()
23 struct devfreq *parent_devfreq = (struct devfreq *)p_data->parent; in devfreq_passive_get_target_freq()
34 ret = p_data->get_target_freq(devfreq, freq); in devfreq_passive_get_target_freq()
53 if (!devfreq->profile || !devfreq->profile->freq_table in devfreq_passive_get_target_freq()
54 || devfreq->profile->max_state <= 0) in devfreq_passive_get_target_freq()
84 if (i < devfreq->profile->max_state) { in devfreq_passive_get_target_freq()
85 child_freq = devfreq->profile->freq_table[i]; in devfreq_passive_get_target_freq()
87 count = devfreq->profile->max_state; in devfreq_passive_get_target_freq()
88 child_freq = devfreq->profile->freq_table[count - 1]; in devfreq_passive_get_target_freq()
[all …]
Dgovernor.h19 #define to_devfreq(DEV) container_of((DEV), struct devfreq, dev)
52 int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
53 int (*event_handler)(struct devfreq *devfreq,
58 extern int update_devfreq(struct devfreq *devfreq);
60 extern void devfreq_monitor_start(struct devfreq *devfreq);
61 extern void devfreq_monitor_stop(struct devfreq *devfreq);
62 extern void devfreq_monitor_suspend(struct devfreq *devfreq);
63 extern void devfreq_monitor_resume(struct devfreq *devfreq);
64 extern void devfreq_interval_update(struct devfreq *devfreq,
70 extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
[all …]
Dgovernor_userspace.c25 static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq) in devfreq_userspace_func()
48 struct devfreq *devfreq = to_devfreq(dev); in store_freq() local
53 mutex_lock(&devfreq->lock); in store_freq()
54 data = devfreq->data; in store_freq()
59 err = update_devfreq(devfreq); in store_freq()
62 mutex_unlock(&devfreq->lock); in store_freq()
69 struct devfreq *devfreq = to_devfreq(dev); in show_freq() local
73 mutex_lock(&devfreq->lock); in show_freq()
74 data = devfreq->data; in show_freq()
80 mutex_unlock(&devfreq->lock); in show_freq()
[all …]
Dgovernor_powersave.c16 static int devfreq_powersave_func(struct devfreq *df, in devfreq_powersave_func()
27 static int devfreq_powersave_handler(struct devfreq *devfreq, in devfreq_powersave_handler() argument
33 mutex_lock(&devfreq->lock); in devfreq_powersave_handler()
34 ret = update_devfreq(devfreq); in devfreq_powersave_handler()
35 mutex_unlock(&devfreq->lock); in devfreq_powersave_handler()
Dgovernor_performance.c16 static int devfreq_performance_func(struct devfreq *df, in devfreq_performance_func()
30 static int devfreq_performance_handler(struct devfreq *devfreq, in devfreq_performance_handler() argument
36 mutex_lock(&devfreq->lock); in devfreq_performance_handler()
37 ret = update_devfreq(devfreq); in devfreq_performance_handler()
38 mutex_unlock(&devfreq->lock); in devfreq_performance_handler()
Dgovernor_simpleondemand.c21 static int devfreq_simple_ondemand_func(struct devfreq *df, in devfreq_simple_ondemand_func()
96 static int devfreq_simple_ondemand_handler(struct devfreq *devfreq, in devfreq_simple_ondemand_handler() argument
101 devfreq_monitor_start(devfreq); in devfreq_simple_ondemand_handler()
105 devfreq_monitor_stop(devfreq); in devfreq_simple_ondemand_handler()
109 devfreq_interval_update(devfreq, (unsigned int *)data); in devfreq_simple_ondemand_handler()
113 devfreq_monitor_suspend(devfreq); in devfreq_simple_ondemand_handler()
117 devfreq_monitor_resume(devfreq); in devfreq_simple_ondemand_handler()
DKconfig7 devfreq, a generic DVFS framework can be registered for a device
8 in order to let the governor provided to devfreq choose an
13 notification to "nb", a notifier block, of devfreq.
17 determined by the single device's state, an instance of devfreq
20 to a device by 1-to-1. The device registering devfreq takes the
23 given to devfreq.
25 When OPP is used with the devfreq device, it is recommended to
26 register devfreq's nb to the OPP's notifier head. If OPP is
27 used with the devfreq device, you may use OPP helper
28 functions defined in devfreq.h.
[all …]
Dexynos-bus.c33 struct devfreq *devfreq; member
385 struct devfreq *parent_devfreq; in exynos_bus_probe()
439 bus->devfreq = devm_devfreq_add_device(dev, profile, in exynos_bus_probe()
442 if (IS_ERR(bus->devfreq)) { in exynos_bus_probe()
444 ret = PTR_ERR(bus->devfreq); in exynos_bus_probe()
449 ret = devm_devfreq_register_opp_notifier(dev, bus->devfreq); in exynos_bus_probe()
492 bus->devfreq = devm_devfreq_add_device(dev, profile, DEVFREQ_GOV_PASSIVE, in exynos_bus_probe()
494 if (IS_ERR(bus->devfreq)) { in exynos_bus_probe()
497 ret = PTR_ERR(bus->devfreq); in exynos_bus_probe()
502 max_state = bus->devfreq->profile->max_state; in exynos_bus_probe()
[all …]
Dtegra-devfreq.c163 struct devfreq *devfreq; member
376 mutex_lock(&tegra->devfreq->lock); in actmon_thread_isr()
377 update_devfreq(tegra->devfreq); in actmon_thread_isr()
378 mutex_unlock(&tegra->devfreq->lock); in actmon_thread_isr()
542 static int tegra_governor_get_target(struct devfreq *devfreq, in tegra_governor_get_target() argument
552 err = devfreq_update_stats(devfreq); in tegra_governor_get_target()
556 stat = &devfreq->last_status; in tegra_governor_get_target()
573 static int tegra_governor_event_handler(struct devfreq *devfreq, in tegra_governor_event_handler() argument
579 tegra = dev_get_drvdata(devfreq->dev.parent); in tegra_governor_event_handler()
583 devfreq_monitor_start(devfreq); in tegra_governor_event_handler()
[all …]
DMakefile2 obj-$(CONFIG_PM_DEVFREQ) += devfreq.o
3 obj-$(CONFIG_PM_DEVFREQ_EVENT) += devfreq-event.o
13 obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra-devfreq.o
Drk3399_dmc.c65 struct devfreq *devfreq; member
195 ret = devfreq_suspend_device(dmcfreq->devfreq); in rk3399_dmcfreq_suspend()
215 ret = devfreq_resume_device(dmcfreq->devfreq); in rk3399_dmcfreq_resume()
389 data->devfreq = devm_devfreq_add_device(dev, in rk3399_dmcfreq_probe()
393 if (IS_ERR(data->devfreq)) { in rk3399_dmcfreq_probe()
394 ret = PTR_ERR(data->devfreq); in rk3399_dmcfreq_probe()
398 devm_devfreq_register_opp_notifier(dev, data->devfreq); in rk3399_dmcfreq_probe()
417 devm_devfreq_unregister_opp_notifier(dmcfreq->dev, dmcfreq->devfreq); in rk3399_dmcfreq_remove()
/Linux-v4.19/include/linux/
Ddevfreq.h36 struct devfreq;
148 struct devfreq { struct
185 extern struct devfreq *devfreq_add_device(struct device *dev, argument
189 extern int devfreq_remove_device(struct devfreq *devfreq);
190 extern struct devfreq *devm_devfreq_add_device(struct device *dev,
195 struct devfreq *devfreq);
198 extern int devfreq_suspend_device(struct devfreq *devfreq);
199 extern int devfreq_resume_device(struct devfreq *devfreq);
205 struct devfreq *devfreq);
207 struct devfreq *devfreq);
[all …]
Ddevfreq_cooling.h56 unsigned long (*get_static_power)(struct devfreq *devfreq,
58 unsigned long (*get_dynamic_power)(struct devfreq *devfreq,
61 int (*get_real_power)(struct devfreq *df, u32 *power,
69 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
72 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df);
73 struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df);
79 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, in of_devfreq_cooling_register_power()
86 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df) in of_devfreq_cooling_register()
92 devfreq_cooling_register(struct devfreq *df) in devfreq_cooling_register()
/Linux-v4.19/Documentation/ABI/testing/
Dsysfs-class-devfreq1 What: /sys/class/devfreq/.../
5 Provide a place in sysfs for the devfreq objects.
6 This allows accessing various devfreq specific variables.
7 The name of devfreq object denoted as ... is same as the
8 name of device using devfreq.
10 What: /sys/class/devfreq/.../governor
14 The /sys/class/devfreq/.../governor show or set the name of the
15 governor used by the corresponding devfreq object.
17 What: /sys/class/devfreq/.../cur_freq
21 The /sys/class/devfreq/.../cur_freq shows the current
[all …]
Dsysfs-class-devfreq-event1 What: /sys/class/devfreq-event/event(x)/
5 Provide a place in sysfs for the devfreq-event objects.
6 This allows accessing various devfreq-event specific variables.
7 The name of devfreq-event object denoted as 'event(x)' which
8 includes the unique number of 'x' for each devfreq-event object.
10 What: /sys/class/devfreq-event/event(x)/name
14 The /sys/class/devfreq-event/event(x)/name attribute contains
15 the name of the devfreq-event object. This attribute is
18 What: /sys/class/devfreq-event/event(x)/enable_count
22 The /sys/class/devfreq-event/event(x)/enable_count attribute
[all …]
/Linux-v4.19/drivers/thermal/
Ddevfreq_cooling.c60 struct devfreq *devfreq; member
82 struct device *dev = dfc->devfreq->dev.parent; in partition_enable_opps()
135 struct devfreq *df = dfc->devfreq; in devfreq_cooling_set_cur_state()
177 static unsigned long get_voltage(struct devfreq *df, unsigned long freq) in get_voltage()
218 struct devfreq *df = dfc->devfreq; in get_static_power()
253 return dfc_power->get_dynamic_power(dfc->devfreq, freq, in get_dynamic_power()
278 struct devfreq *df = dfc->devfreq; in devfreq_cooling_get_requested_power()
357 struct devfreq *df = dfc->devfreq; in devfreq_cooling_power2state()
421 struct devfreq *df = dfc->devfreq; in devfreq_cooling_gen_tables()
505 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, in of_devfreq_cooling_register_power()
[all …]
/Linux-v4.19/drivers/devfreq/event/
DKconfig4 The devfreq-event device provide the raw data and events which
5 indicate the current state of devfreq-event device. The provided
6 data from devfreq-event device is used to monitor the state of
10 The devfreq-event device can support the various type of events
12 may be used by devfreq governor and other subsystem.
22 This add the devfreq-event driver for Exynos SoC. It provides NoC
30 This add the devfreq-event driver for Exynos SoC. It provides PPMU
38 This add the devfreq-event driver for Rockchip SoC. It provides DFI
/Linux-v4.19/arch/arm/boot/dts/
Dexynos5422-odroid-core.dtsi40 devfreq-events = <&nocp_mem0_0>, <&nocp_mem0_1>,
48 devfreq = <&bus_wcore>;
53 devfreq = <&bus_wcore>;
58 devfreq = <&bus_wcore>;
63 devfreq = <&bus_wcore>;
68 devfreq = <&bus_wcore>;
73 devfreq = <&bus_wcore>;
78 devfreq = <&bus_wcore>;
83 devfreq = <&bus_wcore>;
88 devfreq = <&bus_wcore>;
[all …]
Dexynos4412-odroid-common.dtsi87 devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
93 devfreq = <&bus_dmc>;
98 devfreq = <&bus_dmc>;
103 devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
109 devfreq = <&bus_leftbus>;
114 devfreq = <&bus_leftbus>;
119 devfreq = <&bus_leftbus>;
124 devfreq = <&bus_leftbus>;
129 devfreq = <&bus_leftbus>;
Dexynos4412-itop-scp-core.dtsi69 devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
75 devfreq = <&bus_dmc>;
80 devfreq = <&bus_dmc>;
85 devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
91 devfreq = <&bus_leftbus>;
96 devfreq = <&bus_leftbus>;
101 devfreq = <&bus_leftbus>;
106 devfreq = <&bus_leftbus>;
/Linux-v4.19/drivers/gpu/drm/msm/
Dmsm_gpu.c61 status->busy_time = ((u32) (cycles - gpu->devfreq.busy_cycles)) / freq; in msm_devfreq_get_dev_status()
63 gpu->devfreq.busy_cycles = cycles; in msm_devfreq_get_dev_status()
66 status->total_time = ktime_us_delta(time, gpu->devfreq.time); in msm_devfreq_get_dev_status()
67 gpu->devfreq.time = time; in msm_devfreq_get_dev_status()
101 gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev, in msm_devfreq_init()
104 if (IS_ERR(gpu->devfreq.devfreq)) { in msm_devfreq_init()
106 gpu->devfreq.devfreq = NULL; in msm_devfreq_init()
205 if (gpu->devfreq.devfreq) { in msm_gpu_pm_resume()
206 gpu->devfreq.busy_cycles = 0; in msm_gpu_pm_resume()
207 gpu->devfreq.time = ktime_get(); in msm_gpu_pm_resume()
[all …]
Dmsm_gpu.h132 struct devfreq *devfreq; member
135 } devfreq; member
/Linux-v4.19/Documentation/devicetree/bindings/devfreq/
Dexynos-bus.txt44 - devfreq-events: the devfreq-event device to monitor the current utilization
48 - devfreq: the parent bus device.
379 devfreq-events = <&ppmu_dmc0_3>, <&ppmu_dmc1_3>;
385 devfreq-events = <&ppmu_leftbus_3>, <&ppmu_rightbus_3>;
391 devfreq = <&bus_leftbus>;
396 devfreq = <&bus_leftbus>;
401 devfreq = <&bus_leftbus>;
406 devfreq = <&bus_leftbus>;
411 devfreq = <&bus_leftbus>;
416 devfreq = <&bus_leftbus>;
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/devfreq/event/
Dexynos-ppmu.txt9 The Exynos PPMU driver uses the devfreq-event class to provide event data
10 to various devfreq devices. The devfreq devices would use the event data when

12