/linux/drivers/devfreq/ |
H A D | devfreq.c | 67 static struct devfreq *find_device_devfreq(struct device *dev) in find_device_devfreq() 69 struct devfreq *tmp_devfreq; in find_device_devfreq() 86 static unsigned long find_available_min_freq(struct devfreq *devfreq) in find_available_min_freq() argument 91 opp = dev_pm_opp_find_freq_ceil_indexed(devfreq->dev.parent, &min_freq, 0); in find_available_min_freq() 100 static unsigned long find_available_max_freq(struct devfreq *devfreq) in find_available_max_freq() argument 105 opp = dev_pm_opp_find_freq_floor_indexed(devfreq->dev.parent, &max_freq, 0); in find_available_max_freq() 122 void devfreq_get_freq_range(struct devfreq *devfreq, in devfreq_get_freq_range() argument 126 unsigned long *freq_table = devfreq->freq_table; in devfreq_get_freq_range() 129 lockdep_assert_held(&devfreq->lock); in devfreq_get_freq_range() 136 if (freq_table[0] < freq_table[devfreq->max_state - 1]) { in devfreq_get_freq_range() [all …]
|
H A D | governor_passive.c | 77 static int get_target_freq_with_cpufreq(struct devfreq *devfreq, in get_target_freq_with_cpufreq() argument 81 (struct devfreq_passive_data *)devfreq->data; in get_target_freq_with_cpufreq() 106 devfreq->opp_table, &cpu_cur); in get_target_freq_with_cpufreq() 114 devfreq_get_freq_range(devfreq, &dev_min, &dev_max); in get_target_freq_with_cpufreq() 130 static int get_target_freq_with_devfreq(struct devfreq *devfreq, in get_target_freq_with_devfreq() argument 134 = (struct devfreq_passive_data *)devfreq->data; in get_target_freq_with_devfreq() 135 struct devfreq *parent_devfreq = (struct devfreq *)p_data->parent; in get_target_freq_with_devfreq() 142 devfreq->opp_table, freq); in get_target_freq_with_devfreq() 154 if (i < devfreq->max_state) { in get_target_freq_with_devfreq() 155 child_freq = devfreq->freq_table[i]; in get_target_freq_with_devfreq() [all …]
|
H A D | governor_userspace.c | 23 static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq) in devfreq_userspace_func() 38 struct devfreq *devfreq = to_devfreq(dev); in set_freq_store() local 47 mutex_lock(&devfreq->lock); in set_freq_store() 48 data = devfreq->governor_data; in set_freq_store() 52 err = update_devfreq(devfreq); in set_freq_store() 55 mutex_unlock(&devfreq->lock); in set_freq_store() 62 struct devfreq *devfreq = to_devfreq(dev); in set_freq_show() local 66 mutex_lock(&devfreq->lock); in set_freq_show() 67 data = devfreq->governor_data; in set_freq_show() 73 mutex_unlock(&devfreq->lock); in set_freq_show() [all …]
|
H A D | governor.h | 18 #define to_devfreq(DEV) container_of((DEV), struct devfreq, dev) 98 int (*get_target_freq)(struct devfreq *this, unsigned long *freq); 99 int (*event_handler)(struct devfreq *devfreq, 103 void devfreq_monitor_start(struct devfreq *devfreq); 104 void devfreq_monitor_stop(struct devfreq *devfreq); 105 void devfreq_monitor_suspend(struct devfreq *devfreq); 106 void devfreq_monitor_resume(struct devfreq *devfreq); 107 void devfreq_update_interval(struct devfreq *devfreq, unsigned int *delay); 115 int devfreq_update_status(struct devfreq *devfreq, unsigned long freq); 116 int devfreq_update_target(struct devfreq *devfreq, unsigned long freq); [all …]
|
H A D | tegra30-devfreq.c | 180 struct devfreq *devfreq; member 255 u32 band = avg_band_freq * tegra->devfreq->profile->polling_ms; in tegra_devfreq_update_avg_wmark() 268 u32 val = tegra->cur_freq * tegra->devfreq->profile->polling_ms; in tegra_devfreq_update_wmark() 347 target_freq = dev->avg_count / tegra->devfreq->profile->polling_ms; in actmon_device_target_freq() 381 mutex_lock(&tegra->devfreq->lock); in actmon_thread_isr() 392 update_devfreq(tegra->devfreq); in actmon_thread_isr() 394 mutex_unlock(&tegra->devfreq->lock); in actmon_thread_isr() 428 mutex_lock(&tegra->devfreq->lock); in tegra_actmon_delayed_update() 429 update_devfreq(tegra->devfreq); in tegra_actmon_delayed_update() 430 mutex_unlock(&tegra->devfreq->lock); in tegra_actmon_delayed_update() [all …]
|
H A D | governor_simpleondemand.c | 18 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()
|
H A D | governor_powersave.c | 13 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()
|
H A D | governor_performance.c | 13 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()
|
H A D | Kconfig | 7 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 …]
|
H A D | Makefile | 2 obj-$(CONFIG_PM_DEVFREQ) += devfreq.o 3 obj-$(CONFIG_PM_DEVFREQ_EVENT) += devfreq-event.o 15 obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ) += mtk-cci-devfreq.o 18 obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o
|
/linux/drivers/gpu/drm/lima/ |
H A D | lima_devfreq.c | 19 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() 47 static void lima_devfreq_reset(struct lima_devfreq *devfreq) in lima_devfreq_reset() argument 49 devfreq->busy_time = 0; in lima_devfreq_reset() 50 devfreq->idle_time = 0; in lima_devfreq_reset() 51 devfreq->time_last_update = ktime_get(); in lima_devfreq_reset() [all …]
|
H A D | lima_devfreq.h | 11 struct devfreq; 17 struct devfreq *devfreq; member 36 void lima_devfreq_record_busy(struct lima_devfreq *devfreq); 37 void lima_devfreq_record_idle(struct lima_devfreq *devfreq); 39 int lima_devfreq_resume(struct lima_devfreq *devfreq); 40 int lima_devfreq_suspend(struct lima_devfreq *devfreq);
|
/linux/include/linux/ |
H A D | devfreq.h | 39 struct devfreq; 184 struct devfreq { struct 232 struct devfreq *devfreq_add_device(struct device *dev, argument 236 int devfreq_remove_device(struct devfreq *devfreq); 237 struct devfreq *devm_devfreq_add_device(struct device *dev, 241 void devm_devfreq_remove_device(struct device *dev, struct devfreq *devfreq); 244 int devfreq_suspend_device(struct devfreq *devfreq); 245 int devfreq_resume_device(struct devfreq *devfreq); 251 int update_devfreq(struct devfreq *devfreq); 257 struct devfreq *devfreq); [all …]
|
H A D | devfreq_cooling.h | 38 int (*get_real_power)(struct devfreq *df, u32 *power, 45 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, 48 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df); 49 struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df); 52 devfreq_cooling_em_register(struct devfreq *df, 58 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, in of_devfreq_cooling_register_power() 65 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df) in of_devfreq_cooling_register() 71 devfreq_cooling_register(struct devfreq *df) in devfreq_cooling_register() 77 devfreq_cooling_em_register(struct devfreq *df, in devfreq_cooling_em_register()
|
/linux/Documentation/translations/zh_CN/doc-guide/ |
H A D | contributing.rst | 47 ./drivers/devfreq/devfreq.c:1818: warning: bad line: 49 ./drivers/devfreq/devfreq.c:1854: warning: bad line: 59 * @dev: The devfreq user device. (parent of devfreq) 60 * @devfreq: The devfreq object. 70 [PATCH] PM / devfreq: Fix two malformed kerneldoc comments 72 Two kerneldoc comments in devfreq.c fail to adhere to the required format, 75 ./drivers/devfreq/devfreq.c:1818: warning: bad line: 77 ./drivers/devfreq/devfreq.c:1854: warning: bad line: 84 drivers/devfreq/devfreq.c | 4 ++-- 87 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c [all …]
|
/linux/Documentation/ABI/testing/ |
H A D | sysfs-class-devfreq | 1 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 …]
|
H A D | sysfs-class-devfreq-event | 1 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/drivers/powercap/ |
H A D | dtpm_devfreq.c | 26 struct devfreq *devfreq; member 37 struct devfreq *devfreq = dtpm_devfreq->devfreq; in update_pd_power_uw() local 38 struct device *dev = devfreq->dev.parent; in update_pd_power_uw() 56 struct devfreq *devfreq = dtpm_devfreq->devfreq; in set_pd_power_limit() local 57 struct device *dev = devfreq->dev.parent; in set_pd_power_limit() 96 struct devfreq *devfreq = dtpm_devfreq->devfreq; in get_pd_power_uw() local 97 struct device *dev = devfreq->dev.parent; in get_pd_power_uw() 105 mutex_lock(&devfreq->lock); in get_pd_power_uw() 106 status = devfreq->last_status; in get_pd_power_uw() 107 mutex_unlock(&devfreq->lock); in get_pd_power_uw() [all …]
|
/linux/include/trace/events/ |
H A D | devfreq.h | 3 #define TRACE_SYSTEM devfreq 8 #include <linux/devfreq.h> 12 TP_PROTO(struct devfreq *devfreq, unsigned long freq, 15 TP_ARGS(devfreq, freq, prev_freq), 18 __string(dev_name, dev_name(&devfreq->dev)) 29 __entry->busy_time = devfreq->last_status.busy_time; 30 __entry->total_time = devfreq->last_status.total_time; 40 TP_PROTO(struct devfreq *devfreq), [all...] |
/linux/drivers/gpu/drm/panthor/ |
H A D | panthor_devfreq.c | 20 struct devfreq *devfreq; member 92 struct panthor_devfreq *pdevfreq = ptdev->devfreq; in panthor_devfreq_get_dev_status() 142 pdevfreq = drmm_kzalloc(&ptdev->base, sizeof(*ptdev->devfreq), GFP_KERNEL); in panthor_devfreq_init() 146 ptdev->devfreq = pdevfreq; in panthor_devfreq_init() 229 pdevfreq->devfreq = devm_devfreq_add_device(dev, &panthor_devfreq_profile, in panthor_devfreq_init() 232 if (IS_ERR(pdevfreq->devfreq)) { in panthor_devfreq_init() 234 ret = PTR_ERR(pdevfreq->devfreq); in panthor_devfreq_init() 235 pdevfreq->devfreq = NULL; in panthor_devfreq_init() 239 cooling = devfreq_cooling_em_register(pdevfreq->devfreq, NULL); in panthor_devfreq_init() 248 struct panthor_devfreq *pdevfreq = ptdev->devfreq; in panthor_devfreq_resume() [all …]
|
/linux/Documentation/driver-api/ |
H A D | devfreq.rst | 23 :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
|
/linux/drivers/thermal/ |
H A D | devfreq_cooling.c | 53 struct devfreq *devfreq; member 88 struct devfreq *df = dfc->devfreq; in devfreq_cooling_set_cur_state() 148 static unsigned long get_voltage(struct devfreq *df, unsigned long freq) in get_voltage() 194 struct devfreq *df = dfc->devfreq; in devfreq_cooling_get_requested_power() 291 struct devfreq *df = dfc->devfreq; in devfreq_cooling_power2state() 351 struct devfreq *df = dfc->devfreq; in devfreq_cooling_gen_tables() 393 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df, in of_devfreq_cooling_register_power() 409 dfc->devfreq = df; in of_devfreq_cooling_register_power() 490 of_devfreq_cooling_register(struct device_node *np, struct devfreq *df) in of_devfreq_cooling_register() 500 struct thermal_cooling_device *devfreq_cooling_register(struct devfreq *df) in devfreq_cooling_register() [all …]
|
/linux/drivers/devfreq/event/ |
H A D | Kconfig | 5 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
|
/linux/drivers/gpu/drm/panfrost/ |
H A D | panfrost_devfreq.h | 11 struct devfreq; 17 struct devfreq *devfreq; member 42 void panfrost_devfreq_record_busy(struct panfrost_devfreq *devfreq); 43 void panfrost_devfreq_record_idle(struct panfrost_devfreq *devfreq);
|
/linux/Documentation/doc-guide/ |
H A D | contributing.rst | 58 ./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. 86 [PATCH] PM / devfreq: Fix two malformed kerneldoc comments 88 Two kerneldoc comments in devfreq.c fail to adhere to the required format, 91 ./drivers/devfreq/devfreq.c:1818: warning: bad line: 93 ./drivers/devfreq/devfreq.c:1854: warning: bad line: 100 drivers/devfreq/devfreq.c | 4 ++-- 103 diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c [all …]
|