Home
last modified time | relevance | path

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

123

/kernel/linux/linux-5.10/drivers/devfreq/
Ddevfreq.c64 static struct devfreq *find_device_devfreq(struct device *dev) in find_device_devfreq()
66 struct devfreq *tmp_devfreq; in find_device_devfreq()
83 static unsigned long find_available_min_freq(struct devfreq *devfreq) in find_available_min_freq() argument
88 opp = dev_pm_opp_find_freq_ceil(devfreq->dev.parent, &min_freq); in find_available_min_freq()
97 static unsigned long find_available_max_freq(struct devfreq *devfreq) in find_available_max_freq() argument
102 opp = dev_pm_opp_find_freq_floor(devfreq->dev.parent, &max_freq); in find_available_max_freq()
119 static void get_freq_range(struct devfreq *devfreq, in get_freq_range() argument
123 unsigned long *freq_table = devfreq->profile->freq_table; in get_freq_range()
126 lockdep_assert_held(&devfreq->lock); in get_freq_range()
133 if (freq_table[0] < freq_table[devfreq->profile->max_state - 1]) { in get_freq_range()
[all …]
Dgovernor_passive.c15 static int devfreq_passive_get_target_freq(struct devfreq *devfreq, in devfreq_passive_get_target_freq() argument
19 = (struct devfreq_passive_data *)devfreq->data; in devfreq_passive_get_target_freq()
20 struct devfreq *parent_devfreq = (struct devfreq *)p_data->parent; in devfreq_passive_get_target_freq()
31 ret = p_data->get_target_freq(devfreq, freq); in devfreq_passive_get_target_freq()
50 if (!devfreq->profile || !devfreq->profile->freq_table in devfreq_passive_get_target_freq()
51 || devfreq->profile->max_state <= 0) in devfreq_passive_get_target_freq()
81 if (i < devfreq->profile->max_state) { in devfreq_passive_get_target_freq()
82 child_freq = devfreq->profile->freq_table[i]; in devfreq_passive_get_target_freq()
84 count = devfreq->profile->max_state; in devfreq_passive_get_target_freq()
85 child_freq = devfreq->profile->freq_table[count - 1]; in devfreq_passive_get_target_freq()
[all …]
Dgovernor_userspace.c22 static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq) in devfreq_userspace_func()
37 struct devfreq *devfreq = to_devfreq(dev); in store_freq() local
42 mutex_lock(&devfreq->lock); in store_freq()
43 data = devfreq->governor_data; in store_freq()
48 err = update_devfreq(devfreq); in store_freq()
51 mutex_unlock(&devfreq->lock); in store_freq()
58 struct devfreq *devfreq = to_devfreq(dev); in show_freq() local
62 mutex_lock(&devfreq->lock); in show_freq()
63 data = devfreq->governor_data; in show_freq()
69 mutex_unlock(&devfreq->lock); in show_freq()
[all …]
Dgovernor.h16 #define to_devfreq(DEV) container_of((DEV), struct devfreq, dev)
55 int (*get_target_freq)(struct devfreq *this, unsigned long *freq);
56 int (*event_handler)(struct devfreq *devfreq,
60 void devfreq_monitor_start(struct devfreq *devfreq);
61 void devfreq_monitor_stop(struct devfreq *devfreq);
62 void devfreq_monitor_suspend(struct devfreq *devfreq);
63 void devfreq_monitor_resume(struct devfreq *devfreq);
64 void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay);
69 int devfreq_update_status(struct devfreq *devfreq, unsigned long freq);
71 static inline int devfreq_update_stats(struct devfreq *df) in devfreq_update_stats()
Dtegra30-devfreq.c157 struct devfreq *devfreq; member
230 u32 band = avg_band_freq * tegra->devfreq->profile->polling_ms; in tegra_devfreq_update_avg_wmark()
243 u32 val = tegra->cur_freq * tegra->devfreq->profile->polling_ms; in tegra_devfreq_update_wmark()
322 target_freq = dev->avg_count / tegra->devfreq->profile->polling_ms; in actmon_device_target_freq()
356 mutex_lock(&tegra->devfreq->lock); in actmon_thread_isr()
367 update_devfreq(tegra->devfreq); in actmon_thread_isr()
369 mutex_unlock(&tegra->devfreq->lock); in actmon_thread_isr()
403 mutex_lock(&tegra->devfreq->lock); in tegra_actmon_delayed_update()
404 update_devfreq(tegra->devfreq); in tegra_actmon_delayed_update()
405 mutex_unlock(&tegra->devfreq->lock); in tegra_actmon_delayed_update()
[all …]
Dgovernor_simpleondemand.c18 static int devfreq_simple_ondemand_func(struct devfreq *df, in devfreq_simple_ondemand_func()
87 static int devfreq_simple_ondemand_handler(struct devfreq *devfreq, in devfreq_simple_ondemand_handler() argument
92 devfreq_monitor_start(devfreq); in devfreq_simple_ondemand_handler()
96 devfreq_monitor_stop(devfreq); in devfreq_simple_ondemand_handler()
100 devfreq_update_interval(devfreq, (unsigned int *)data); in devfreq_simple_ondemand_handler()
104 devfreq_monitor_suspend(devfreq); in devfreq_simple_ondemand_handler()
108 devfreq_monitor_resume(devfreq); in devfreq_simple_ondemand_handler()
Dgovernor_performance.c13 static int devfreq_performance_func(struct devfreq *df, in devfreq_performance_func()
24 static int devfreq_performance_handler(struct devfreq *devfreq, in devfreq_performance_handler() argument
30 mutex_lock(&devfreq->lock); in devfreq_performance_handler()
31 ret = update_devfreq(devfreq); in devfreq_performance_handler()
32 mutex_unlock(&devfreq->lock); in devfreq_performance_handler()
Dgovernor_powersave.c13 static int devfreq_powersave_func(struct devfreq *df, in devfreq_powersave_func()
24 static int devfreq_powersave_handler(struct devfreq *devfreq, in devfreq_powersave_handler() argument
30 mutex_lock(&devfreq->lock); in devfreq_powersave_handler()
31 ret = update_devfreq(devfreq); in devfreq_powersave_handler()
32 mutex_unlock(&devfreq->lock); in devfreq_powersave_handler()
Dtegra20-devfreq.c32 struct devfreq *devfreq; member
41 struct devfreq *devfreq = tegra->devfreq; in tegra_devfreq_target() local
64 clk_set_min_rate(tegra->emc_clock, devfreq->previous_freq); in tegra_devfreq_target()
175 tegra->devfreq = devfreq_add_device(&pdev->dev, &tegra_devfreq_profile, in tegra_devfreq_probe()
177 if (IS_ERR(tegra->devfreq)) { in tegra_devfreq_probe()
178 err = PTR_ERR(tegra->devfreq); in tegra_devfreq_probe()
194 devfreq_remove_device(tegra->devfreq); in tegra_devfreq_remove()
Dexynos-bus.c28 struct devfreq *devfreq; member
312 bus->devfreq = devm_devfreq_add_device(dev, profile, in exynos_bus_profile_init()
315 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init()
317 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init()
321 ret = devm_devfreq_register_opp_notifier(dev, bus->devfreq); in exynos_bus_profile_init()
357 struct devfreq *parent_devfreq; in exynos_bus_profile_init_passive()
375 bus->devfreq = devm_devfreq_add_device(dev, profile, DEVFREQ_GOV_PASSIVE, in exynos_bus_profile_init_passive()
377 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init_passive()
380 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init_passive()
435 max_state = bus->devfreq->profile->max_state; in exynos_bus_probe()
[all …]
DMakefile2 obj-$(CONFIG_PM_DEVFREQ) += devfreq.o
3 obj-$(CONFIG_PM_DEVFREQ_EVENT) += devfreq-event.o
15 obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o
16 obj-$(CONFIG_ARM_TEGRA20_DEVFREQ) += tegra20-devfreq.o
DKconfig8 devfreq, a generic DVFS framework can be registered for a device
9 in order to let the governor provided to devfreq choose an
14 notification to "nb", a notifier block, of devfreq.
18 determined by the single device's state, an instance of devfreq
21 to a device by 1-to-1. The device registering devfreq takes the
24 given to devfreq.
26 When OPP is used with the devfreq device, it is recommended to
27 register devfreq's nb to the OPP's notifier head. If OPP is
28 used with the devfreq device, you may use OPP helper
29 functions defined in devfreq.h.
[all …]
/kernel/linux/linux-5.10/drivers/gpu/drm/lima/
Dlima_devfreq.c19 static void lima_devfreq_update_utilization(struct lima_devfreq *devfreq) in lima_devfreq_update_utilization() argument
24 last = devfreq->time_last_update; in lima_devfreq_update_utilization()
26 if (devfreq->busy_count > 0) in lima_devfreq_update_utilization()
27 devfreq->busy_time += ktime_sub(now, last); in lima_devfreq_update_utilization()
29 devfreq->idle_time += ktime_sub(now, last); in lima_devfreq_update_utilization()
31 devfreq->time_last_update = now; in lima_devfreq_update_utilization()
52 static void lima_devfreq_reset(struct lima_devfreq *devfreq) in lima_devfreq_reset() argument
54 devfreq->busy_time = 0; in lima_devfreq_reset()
55 devfreq->idle_time = 0; in lima_devfreq_reset()
56 devfreq->time_last_update = ktime_get(); in lima_devfreq_reset()
[all …]
Dlima_devfreq.h10 struct devfreq;
17 struct devfreq *devfreq; member
38 void lima_devfreq_record_busy(struct lima_devfreq *devfreq);
39 void lima_devfreq_record_idle(struct lima_devfreq *devfreq);
41 int lima_devfreq_resume(struct lima_devfreq *devfreq);
42 int lima_devfreq_suspend(struct lima_devfreq *devfreq);
/kernel/linux/linux-5.10/include/linux/
Ddevfreq.h41 struct devfreq;
172 struct devfreq { struct
214 struct devfreq *devfreq_add_device(struct device *dev, argument
218 int devfreq_remove_device(struct devfreq *devfreq);
219 struct devfreq *devm_devfreq_add_device(struct device *dev,
223 void devm_devfreq_remove_device(struct device *dev, struct devfreq *devfreq);
226 int devfreq_suspend_device(struct devfreq *devfreq);
227 int devfreq_resume_device(struct devfreq *devfreq);
233 int update_devfreq(struct devfreq *devfreq);
239 struct devfreq *devfreq);
[all …]
Ddevfreq_cooling.h49 unsigned long (*get_static_power)(struct devfreq *devfreq,
51 unsigned long (*get_dynamic_power)(struct devfreq *devfreq,
54 int (*get_real_power)(struct devfreq *df, u32 *power,
62 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
65 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df);
66 struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df);
72 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, in of_devfreq_cooling_register_power()
79 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df) in of_devfreq_cooling_register()
85 devfreq_cooling_register(struct devfreq *df) in devfreq_cooling_register()
/kernel/linux/linux-5.10/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/.../name
14 The /sys/class/devfreq/.../name shows the name of device
15 of the corresponding devfreq object.
17 What: /sys/class/devfreq/.../governor
21 The /sys/class/devfreq/.../governor show or set the name of the
[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 …]
/kernel/linux/linux-5.10/include/trace/events/
Ddevfreq.h3 #define TRACE_SYSTEM devfreq
12 TP_PROTO(struct devfreq *devfreq),
14 TP_ARGS(devfreq),
21 __string(dev_name, dev_name(&devfreq->dev))
25 __entry->freq = devfreq->previous_freq;
26 __entry->busy_time = devfreq->last_status.busy_time;
27 __entry->total_time = devfreq->last_status.total_time;
28 __entry->polling_ms = devfreq->profile->polling_ms;
29 __assign_str(dev_name, dev_name(&devfreq->dev));
/kernel/linux/linux-5.10/drivers/gpu/drm/panfrost/
Dpanfrost_devfreq.c95 struct devfreq *devfreq; in panfrost_devfreq_init() local
137 devfreq = devm_devfreq_add_device(dev, &panfrost_devfreq_profile, in panfrost_devfreq_init()
139 if (IS_ERR(devfreq)) { in panfrost_devfreq_init()
141 ret = PTR_ERR(devfreq); in panfrost_devfreq_init()
144 pfdevfreq->devfreq = devfreq; in panfrost_devfreq_init()
146 cooling = of_devfreq_cooling_register(dev->of_node, devfreq); in panfrost_devfreq_init()
183 if (!pfdevfreq->devfreq) in panfrost_devfreq_resume()
188 devfreq_resume_device(pfdevfreq->devfreq); in panfrost_devfreq_resume()
195 if (!pfdevfreq->devfreq) in panfrost_devfreq_suspend()
198 devfreq_suspend_device(pfdevfreq->devfreq); in panfrost_devfreq_suspend()
[all …]
Dpanfrost_devfreq.h10 struct devfreq;
17 struct devfreq *devfreq; member
39 void panfrost_devfreq_record_busy(struct panfrost_devfreq *devfreq);
40 void panfrost_devfreq_record_idle(struct panfrost_devfreq *devfreq);
/kernel/linux/linux-5.10/Documentation/driver-api/
Ddevfreq.rst23 :c:func:`devfreq_add_device` function to create a :c:type:`devfreq` instance.
25 .. kernel-doc:: include/linux/devfreq.h
26 .. kernel-doc:: include/linux/devfreq-event.h
27 .. kernel-doc:: drivers/devfreq/devfreq.c
29 .. kernel-doc:: drivers/devfreq/devfreq-event.c
/kernel/linux/linux-5.10/drivers/thermal/
Ddevfreq_cooling.c57 struct devfreq *devfreq; member
92 struct devfreq *df = dfc->devfreq; in devfreq_cooling_set_cur_state()
135 static unsigned long get_voltage(struct devfreq *df, unsigned long freq) in get_voltage()
176 struct devfreq *df = dfc->devfreq; in get_static_power()
211 return dfc_power->get_dynamic_power(dfc->devfreq, freq, in get_dynamic_power()
235 struct devfreq *df = dfc->devfreq; in devfreq_cooling_get_requested_power()
312 struct devfreq *df = dfc->devfreq; in devfreq_cooling_power2state()
376 struct devfreq *df = dfc->devfreq; in devfreq_cooling_gen_tables()
460 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, in of_devfreq_cooling_register_power()
472 dfc->devfreq = df; in of_devfreq_cooling_register_power()
[all …]
/kernel/linux/linux-5.10/drivers/devfreq/event/
DKconfig5 The devfreq-event device provide the raw data and events which
6 indicate the current state of devfreq-event device. The provided
7 data from devfreq-event device is used to monitor the state of
11 The devfreq-event device can support the various type of events
13 may be used by devfreq governor and other subsystem.
23 This add the devfreq-event driver for Exynos SoC. It provides NoC
31 This add the devfreq-event driver for Exynos SoC. It provides PPMU
39 This add the devfreq-event driver for Rockchip SoC. It provides DFI
/kernel/linux/linux-5.10/Documentation/doc-guide/
Dcontributing.rst58 ./drivers/devfreq/devfreq.c:1818: warning: bad line:
60 ./drivers/devfreq/devfreq.c:1854: warning: bad line:
71 * @dev: The devfreq user device. (parent of devfreq)
72 * @devfreq: The devfreq object.
85 [PATCH] PM / devfreq: Fix two malformed kerneldoc comments
87 Two kerneldoc comments in devfreq.c fail to adhere to the required format,
90 ./drivers/devfreq/devfreq.c:1818: warning: bad line:
92 ./drivers/devfreq/devfreq.c:1854: warning: bad line:
99 drivers/devfreq/devfreq.c | 4 ++--
102 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
[all …]

123