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()
196 * Get the devfreq-event devices to get the current utilization of in exynos_bus_parent_parse_of()
197 * buses. This raw data will be used in devfreq ondemand governor. in exynos_bus_parent_parse_of()
199 count = devfreq_event_get_edev_count(dev, "devfreq-events"); in exynos_bus_parent_parse_of()
201 dev_err(dev, "failed to get the count of devfreq-event dev\n"); in exynos_bus_parent_parse_of()
216 "devfreq-events", i); in exynos_bus_parent_parse_of()
225 * When measuring the utilization of each AXI bus with devfreq-event in exynos_bus_parent_parse_of()
227 * total cycle of bus during sampling rate. In result, the devfreq in exynos_bus_parent_parse_of()
314 /* Add devfreq device to monitor and handle the exynos bus */ in exynos_bus_profile_init()
315 bus->devfreq = devm_devfreq_add_device(dev, profile, in exynos_bus_profile_init()
318 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init()
319 dev_err(dev, "failed to add devfreq device\n"); in exynos_bus_profile_init()
320 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init()
324 ret = devm_devfreq_register_opp_notifier(dev, bus->devfreq); in exynos_bus_profile_init()
331 * Enable devfreq-event to get raw data which is used to determine in exynos_bus_profile_init()
336 dev_err(dev, "failed to enable devfreq-event devices\n"); in exynos_bus_profile_init()
342 dev_err(dev, "failed to set event to devfreq-event devices\n"); in exynos_bus_profile_init()
350 dev_warn(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_profile_init()
360 struct devfreq *parent_devfreq; in exynos_bus_profile_init_passive()
366 /* Get the instance of parent devfreq device */ in exynos_bus_profile_init_passive()
367 parent_devfreq = devfreq_get_devfreq_by_phandle(dev, "devfreq", 0); in exynos_bus_profile_init_passive()
377 /* Add devfreq device for exynos bus with passive governor */ in exynos_bus_profile_init_passive()
378 bus->devfreq = devm_devfreq_add_device(dev, profile, DEVFREQ_GOV_PASSIVE, in exynos_bus_profile_init_passive()
380 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init_passive()
382 "failed to add devfreq dev with passive governor\n"); in exynos_bus_profile_init_passive()
383 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init_passive()
415 node = of_parse_phandle(dev->of_node, "devfreq", 0); in exynos_bus_probe()
450 max_state = bus->devfreq->profile->max_state; in exynos_bus_probe()
451 min_freq = (bus->devfreq->profile->freq_table[0] / 1000); in exynos_bus_probe()
452 max_freq = (bus->devfreq->profile->freq_table[max_state - 1] / 1000); in exynos_bus_probe()
472 devfreq_suspend_device(bus->devfreq); in exynos_bus_shutdown()
483 dev_err(dev, "failed to enable the devfreq-event devices\n"); in exynos_bus_resume()
497 dev_err(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_suspend()