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()
191 * Get the devfreq-event devices to get the current utilization of in exynos_bus_parent_parse_of()
192 * buses. This raw data will be used in devfreq ondemand governor. in exynos_bus_parent_parse_of()
194 count = devfreq_event_get_edev_count(dev, "devfreq-events"); in exynos_bus_parent_parse_of()
196 dev_err(dev, "failed to get the count of devfreq-event dev\n"); in exynos_bus_parent_parse_of()
211 "devfreq-events", i); in exynos_bus_parent_parse_of()
220 * When measuring the utilization of each AXI bus with devfreq-event in exynos_bus_parent_parse_of()
222 * total cycle of bus during sampling rate. In result, the devfreq in exynos_bus_parent_parse_of()
298 /* Add devfreq device to monitor and handle the exynos bus */ in exynos_bus_profile_init()
299 bus->devfreq = devm_devfreq_add_device(dev, profile, in exynos_bus_profile_init()
302 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init()
303 dev_err(dev, "failed to add devfreq device\n"); in exynos_bus_profile_init()
304 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init()
308 ret = devm_devfreq_register_opp_notifier(dev, bus->devfreq); in exynos_bus_profile_init()
315 * Enable devfreq-event to get raw data which is used to determine in exynos_bus_profile_init()
320 dev_err(dev, "failed to enable devfreq-event devices\n"); in exynos_bus_profile_init()
326 dev_err(dev, "failed to set event to devfreq-event devices\n"); in exynos_bus_profile_init()
334 dev_warn(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_profile_init()
344 struct devfreq *parent_devfreq; in exynos_bus_profile_init_passive()
350 /* Get the instance of parent devfreq device */ in exynos_bus_profile_init_passive()
351 parent_devfreq = devfreq_get_devfreq_by_phandle(dev, "devfreq", 0); in exynos_bus_profile_init_passive()
361 /* Add devfreq device for exynos bus with passive governor */ in exynos_bus_profile_init_passive()
362 bus->devfreq = devm_devfreq_add_device(dev, profile, DEVFREQ_GOV_PASSIVE, in exynos_bus_profile_init_passive()
364 if (IS_ERR(bus->devfreq)) { in exynos_bus_profile_init_passive()
366 "failed to add devfreq dev with passive governor\n"); in exynos_bus_profile_init_passive()
367 return PTR_ERR(bus->devfreq); in exynos_bus_profile_init_passive()
399 node = of_parse_phandle(dev->of_node, "devfreq", 0); in exynos_bus_probe()
434 max_state = bus->devfreq->max_state; in exynos_bus_probe()
435 min_freq = (bus->devfreq->freq_table[0] / 1000); in exynos_bus_probe()
436 max_freq = (bus->devfreq->freq_table[max_state - 1] / 1000); in exynos_bus_probe()
454 devfreq_suspend_device(bus->devfreq); in exynos_bus_shutdown()
464 dev_err(dev, "failed to enable the devfreq-event devices\n"); in exynos_bus_resume()
478 dev_err(dev, "failed to disable the devfreq-event devices\n"); in exynos_bus_suspend()