Lines Matching full:devfreq
3 * Generic Exynos Bus frequency driver with DEVFREQ Framework
9 * DEVFREQ framework and is based on drivers/devfreq/exynos/exynos4_bus.c.
13 #include <linux/devfreq.h>
14 #include <linux/devfreq-event.h>
28 struct devfreq *devfreq; member
41 * Control the devfreq-event device to get the current state of bus
90 * devfreq function for both simple-ondemand and passive governor
129 dev_err(dev, "failed to get event from devfreq-event devices\n"); in exynos_bus_get_dev_status()
137 dev_dbg(dev, "Usage of devfreq-event : %lu/%lu\n", stat->busy_time, in exynos_bus_get_dev_status()
143 dev_err(dev, "failed to set event to devfreq-event devices\n"); in exynos_bus_get_dev_status()
157 dev_warn(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_exit()
193 * Get the devfreq-event devices to get the current utilization of in exynos_bus_parent_parse_of()
194 * buses. This raw data will be used in devfreq ondemand governor. in exynos_bus_parent_parse_of()
196 count = devfreq_event_get_edev_count(dev, "devfreq-events"); in exynos_bus_parent_parse_of()
198 dev_err(dev, "failed to get the count of devfreq-event dev\n"); in exynos_bus_parent_parse_of()
213 "devfreq-events", i); in exynos_bus_parent_parse_of()
222 * When measuring the utilization of each AXI bus with devfreq-event in exynos_bus_parent_parse_of()
224 * total cycle of bus during sampling rate. In result, the devfreq in exynos_bus_parent_parse_of()
311 /* Add devfreq device to monitor and handle the exynos bus */ in exynos_bus_profile_init()
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()
316 dev_err(dev, "failed to add devfreq device\n"); 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()
328 * Enable devfreq-event to get raw data which is used to determine in exynos_bus_profile_init()
333 dev_err(dev, "failed to enable devfreq-event devices\n"); in exynos_bus_profile_init()
339 dev_err(dev, "failed to set event to devfreq-event devices\n"); in exynos_bus_profile_init()
347 dev_warn(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_profile_init()
357 struct devfreq *parent_devfreq; in exynos_bus_profile_init_passive()
363 /* Get the instance of parent devfreq device */ in exynos_bus_profile_init_passive()
364 parent_devfreq = devfreq_get_devfreq_by_phandle(dev, "devfreq", 0); in exynos_bus_profile_init_passive()
374 /* Add devfreq device for exynos bus with passive governor */ 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()
379 "failed to add devfreq dev with passive governor\n"); in exynos_bus_profile_init_passive()
380 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init_passive()
412 node = of_parse_phandle(dev->of_node, "devfreq", 0); in exynos_bus_probe()
435 max_state = bus->devfreq->profile->max_state; in exynos_bus_probe()
436 min_freq = (bus->devfreq->profile->freq_table[0] / 1000); in exynos_bus_probe()
437 max_freq = (bus->devfreq->profile->freq_table[max_state - 1] / 1000); in exynos_bus_probe()
459 devfreq_suspend_device(bus->devfreq); in exynos_bus_shutdown()
470 dev_err(dev, "failed to enable the devfreq-event devices\n"); in exynos_bus_resume()
484 dev_err(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_suspend()