/drivers/devfreq/ |
D | devfreq.c | 54 static struct devfreq *find_device_devfreq(struct device *dev) in find_device_devfreq() 56 struct devfreq *tmp_devfreq; in find_device_devfreq() 73 static unsigned long find_available_min_freq(struct devfreq *devfreq) in find_available_min_freq() argument 78 opp = dev_pm_opp_find_freq_ceil(devfreq->dev.parent, &min_freq); in find_available_min_freq() 87 static unsigned long find_available_max_freq(struct devfreq *devfreq) in find_available_max_freq() argument 92 opp = dev_pm_opp_find_freq_floor(devfreq->dev.parent, &max_freq); in find_available_max_freq() 106 static int devfreq_get_freq_level(struct devfreq *devfreq, unsigned long freq) in devfreq_get_freq_level() argument 110 for (lev = 0; lev < devfreq->profile->max_state; lev++) in devfreq_get_freq_level() 111 if (freq == devfreq->profile->freq_table[lev]) in devfreq_get_freq_level() 117 static int set_freq_table(struct devfreq *devfreq) in set_freq_table() argument [all …]
|
D | governor_passive.c | 15 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 …]
|
D | governor_userspace.c | 22 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->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->data; in show_freq() 69 mutex_unlock(&devfreq->lock); in show_freq() [all …]
|
D | governor.h | 16 #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, 57 extern void devfreq_monitor_start(struct devfreq *devfreq); 58 extern void devfreq_monitor_stop(struct devfreq *devfreq); 59 extern void devfreq_monitor_suspend(struct devfreq *devfreq); 60 extern void devfreq_monitor_resume(struct devfreq *devfreq); 61 extern void devfreq_interval_update(struct devfreq *devfreq, 67 extern int devfreq_update_status(struct devfreq *devfreq, unsigned long freq); 69 static inline int devfreq_update_stats(struct devfreq *df) in devfreq_update_stats()
|
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_interval_update(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()
|
D | tegra30-devfreq.c | 150 struct devfreq *devfreq; member 339 mutex_lock(&tegra->devfreq->lock); in actmon_thread_isr() 350 update_devfreq(tegra->devfreq); in actmon_thread_isr() 352 mutex_unlock(&tegra->devfreq->lock); in actmon_thread_isr() 453 struct devfreq *devfreq = tegra->devfreq; in tegra_devfreq_target() local 477 clk_set_min_rate(tegra->emc_clock, devfreq->previous_freq); in tegra_devfreq_target() 519 static int tegra_governor_get_target(struct devfreq *devfreq, in tegra_governor_get_target() argument 529 err = devfreq_update_stats(devfreq); in tegra_governor_get_target() 533 stat = &devfreq->last_status; in tegra_governor_get_target() 550 static int tegra_governor_event_handler(struct devfreq *devfreq, in tegra_governor_event_handler() argument [all …]
|
D | tegra20-devfreq.c | 32 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()
|
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()
|
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()
|
D | exynos-bus.c | 29 struct devfreq *devfreq; member 297 struct devfreq *parent_devfreq; in exynos_bus_probe() 352 bus->devfreq = devm_devfreq_add_device(dev, profile, in exynos_bus_probe() 355 if (IS_ERR(bus->devfreq)) { in exynos_bus_probe() 357 ret = PTR_ERR(bus->devfreq); in exynos_bus_probe() 362 ret = devm_devfreq_register_opp_notifier(dev, bus->devfreq); in exynos_bus_probe() 405 bus->devfreq = devm_devfreq_add_device(dev, profile, DEVFREQ_GOV_PASSIVE, in exynos_bus_probe() 407 if (IS_ERR(bus->devfreq)) { in exynos_bus_probe() 410 ret = PTR_ERR(bus->devfreq); in exynos_bus_probe() 415 max_state = bus->devfreq->profile->max_state; in exynos_bus_probe() [all …]
|
D | Kconfig | 8 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 …]
|
D | Makefile | 2 obj-$(CONFIG_PM_DEVFREQ) += devfreq.o 3 obj-$(CONFIG_PM_DEVFREQ_EVENT) += devfreq-event.o 13 obj-$(CONFIG_ARM_TEGRA_DEVFREQ) += tegra30-devfreq.o 14 obj-$(CONFIG_ARM_TEGRA20_DEVFREQ) += tegra20-devfreq.o
|
D | rk3399_dmc.c | 60 struct devfreq *devfreq; member 208 ret = devfreq_suspend_device(dmcfreq->devfreq); in rk3399_dmcfreq_suspend() 228 ret = devfreq_resume_device(dmcfreq->devfreq); in rk3399_dmcfreq_resume() 450 data->devfreq = devm_devfreq_add_device(dev, in rk3399_dmcfreq_probe() 454 if (IS_ERR(data->devfreq)) { in rk3399_dmcfreq_probe() 455 ret = PTR_ERR(data->devfreq); in rk3399_dmcfreq_probe() 459 devm_devfreq_register_opp_notifier(dev, data->devfreq); in rk3399_dmcfreq_probe() 478 devm_devfreq_unregister_opp_notifier(dmcfreq->dev, dmcfreq->devfreq); in rk3399_dmcfreq_remove()
|
/drivers/gpu/drm/panfrost/ |
D | panfrost_devfreq.c | 23 unsigned long old_clk_rate = pfdev->devfreq.cur_freq; in panfrost_devfreq_target() 58 pfdev->devfreq.cur_volt, in panfrost_devfreq_target() 59 pfdev->devfreq.cur_volt); in panfrost_devfreq_target() 70 pfdev->devfreq.cur_freq = target_rate; in panfrost_devfreq_target() 71 pfdev->devfreq.cur_volt = target_volt; in panfrost_devfreq_target() 82 pfdev->devfreq.slot[i].busy_time = 0; in panfrost_devfreq_reset() 83 pfdev->devfreq.slot[i].idle_time = 0; in panfrost_devfreq_reset() 84 pfdev->devfreq.slot[i].time_last_update = now; in panfrost_devfreq_reset() 99 status->total_time = ktime_to_ns(ktime_add(pfdev->devfreq.slot[0].busy_time, in panfrost_devfreq_get_dev_status() 100 pfdev->devfreq.slot[0].idle_time)); in panfrost_devfreq_get_dev_status() [all …]
|
D | panfrost_device.h | 94 struct devfreq *devfreq; member 99 } devfreq; member
|
/drivers/thermal/ |
D | devfreq_cooling.c | 60 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 …]
|
D | Kconfig | 179 This implements the generic devfreq cooling mechanism through 180 frequency reduction for devices using devfreq. 186 devfreq should use the simple_ondemand governor.
|
/drivers/devfreq/event/ |
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
|
/drivers/gpu/drm/msm/ |
D | msm_gpu.c | 60 status->total_time = ktime_us_delta(time, gpu->devfreq.time); in msm_devfreq_get_dev_status() 61 gpu->devfreq.time = time; in msm_devfreq_get_dev_status() 98 gpu->devfreq.devfreq = devm_devfreq_add_device(&gpu->pdev->dev, in msm_devfreq_init() 102 if (IS_ERR(gpu->devfreq.devfreq)) { in msm_devfreq_init() 104 gpu->devfreq.devfreq = NULL; in msm_devfreq_init() 107 devfreq_suspend_device(gpu->devfreq.devfreq); in msm_devfreq_init() 189 gpu->devfreq.busy_cycles = 0; in msm_gpu_resume_devfreq() 190 gpu->devfreq.time = ktime_get(); in msm_gpu_resume_devfreq() 192 devfreq_resume_device(gpu->devfreq.devfreq); in msm_gpu_resume_devfreq() 226 devfreq_suspend_device(gpu->devfreq.devfreq); in msm_gpu_pm_suspend()
|
D | msm_gpu.h | 128 struct devfreq *devfreq; member 131 } devfreq; member
|
/drivers/gpu/drm/msm/adreno/ |
D | a6xx_gpu.c | 749 devfreq_suspend_device(gpu->devfreq.devfreq); in a6xx_pm_suspend() 803 busy_time = (busy_cycles - gpu->devfreq.busy_cycles) * 10; in a6xx_gpu_busy() 806 gpu->devfreq.busy_cycles = busy_cycles; in a6xx_gpu_busy()
|
/drivers/ |
D | Makefile | 163 obj-$(CONFIG_PM_DEVFREQ) += devfreq/
|
D | Kconfig | 169 source "drivers/devfreq/Kconfig"
|
/drivers/scsi/ufs/ |
D | ufshcd.h | 767 struct devfreq *devfreq; member
|
D | ufshcd.c | 1248 devfreq_resume_device(hba->devfreq); in ufshcd_clk_scaling_resume_work() 1352 struct devfreq *devfreq; in ufshcd_devfreq_init() local 1363 devfreq = devfreq_add_device(hba->dev, in ufshcd_devfreq_init() 1367 if (IS_ERR(devfreq)) { in ufshcd_devfreq_init() 1368 ret = PTR_ERR(devfreq); in ufshcd_devfreq_init() 1376 hba->devfreq = devfreq; in ufshcd_devfreq_init() 1386 if (!hba->devfreq) in ufshcd_devfreq_remove() 1389 devfreq_remove_device(hba->devfreq); in ufshcd_devfreq_remove() 1390 hba->devfreq = NULL; in ufshcd_devfreq_remove() 1401 devfreq_suspend_device(hba->devfreq); in __ufshcd_suspend_clkscaling() [all …]
|