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>
29 struct devfreq *devfreq; member
42 * Control the devfreq-event device to get the current state of bus
91 * devfreq function for both simple-ondemand and passive governor
130 dev_err(dev, "failed to get event from devfreq-event devices\n"); in exynos_bus_get_dev_status()
138 dev_dbg(dev, "Usage of devfreq-event : %lu/%lu\n", stat->busy_time, in exynos_bus_get_dev_status()
144 dev_err(dev, "failed to set event to devfreq-event devices\n"); in exynos_bus_get_dev_status()
158 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()
310 /* Add devfreq device to monitor and handle the exynos bus */ in exynos_bus_profile_init()
311 bus->devfreq = devm_devfreq_add_device(dev, profile, in exynos_bus_profile_init()
314 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init()
315 dev_err(dev, "failed to add devfreq device\n"); in exynos_bus_profile_init()
316 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init()
320 ret = devm_devfreq_register_opp_notifier(dev, bus->devfreq); in exynos_bus_profile_init()
327 * Enable devfreq-event to get raw data which is used to determine in exynos_bus_profile_init()
332 dev_err(dev, "failed to enable devfreq-event devices\n"); in exynos_bus_profile_init()
338 dev_err(dev, "failed to set event to devfreq-event devices\n"); in exynos_bus_profile_init()
346 dev_warn(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_profile_init()
356 struct devfreq *parent_devfreq; in exynos_bus_profile_init_passive()
362 /* Get the instance of parent devfreq device */ in exynos_bus_profile_init_passive()
363 parent_devfreq = devfreq_get_devfreq_by_phandle(dev, "devfreq", 0); in exynos_bus_profile_init_passive()
373 /* Add devfreq device for exynos bus with passive governor */ in exynos_bus_profile_init_passive()
374 bus->devfreq = devm_devfreq_add_device(dev, profile, DEVFREQ_GOV_PASSIVE, in exynos_bus_profile_init_passive()
376 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init_passive()
378 "failed to add devfreq dev with passive governor\n"); in exynos_bus_profile_init_passive()
379 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init_passive()
411 node = of_parse_phandle(dev->of_node, "devfreq", 0); in exynos_bus_probe()
446 max_state = bus->devfreq->max_state; in exynos_bus_probe()
447 min_freq = (bus->devfreq->freq_table[0] / 1000); in exynos_bus_probe()
448 max_freq = (bus->devfreq->freq_table[max_state - 1] / 1000); in exynos_bus_probe()
467 devfreq_suspend_device(bus->devfreq); in exynos_bus_shutdown()
478 dev_err(dev, "failed to enable the devfreq-event devices\n"); in exynos_bus_resume()
492 dev_err(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_suspend()