Lines Matching refs:df

1394 	struct devfreq *df = to_devfreq(dev);  in name_show()  local
1395 return sprintf(buf, "%s\n", dev_name(df->dev.parent)); in name_show()
1402 struct devfreq *df = to_devfreq(dev); in governor_show() local
1404 if (!df->governor) in governor_show()
1407 return sprintf(buf, "%s\n", df->governor->name); in governor_show()
1413 struct devfreq *df = to_devfreq(dev); in governor_store() local
1418 if (!df->governor) in governor_store()
1431 if (df->governor == governor) { in governor_store()
1434 } else if (IS_SUPPORTED_FLAG(df->governor->flags, IMMUTABLE) in governor_store()
1444 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); in governor_store()
1447 __func__, df->governor->name, ret); in governor_store()
1450 remove_sysfs_files(df, df->governor); in governor_store()
1456 prev_governor = df->governor; in governor_store()
1457 df->governor = governor; in governor_store()
1458 ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); in governor_store()
1461 __func__, df->governor->name, ret); in governor_store()
1464 df->governor = prev_governor; in governor_store()
1465 ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); in governor_store()
1470 df->governor = NULL; in governor_store()
1479 create_sysfs_files(df, df->governor); in governor_store()
1494 struct devfreq *df = to_devfreq(d); in available_governors_show() local
1497 if (!df->governor) in available_governors_show()
1506 if (IS_SUPPORTED_FLAG(df->governor->flags, IMMUTABLE)) { in available_governors_show()
1508 "%s ", df->governor->name); in available_governors_show()
1540 struct devfreq *df = to_devfreq(dev); in cur_freq_show() local
1542 if (!df->profile) in cur_freq_show()
1545 if (df->profile->get_cur_freq && in cur_freq_show()
1546 !df->profile->get_cur_freq(df->dev.parent, &freq)) in cur_freq_show()
1549 return sprintf(buf, "%lu\n", df->previous_freq); in cur_freq_show()
1556 struct devfreq *df = to_devfreq(dev); in target_freq_show() local
1558 return sprintf(buf, "%lu\n", df->previous_freq); in target_freq_show()
1565 struct devfreq *df = to_devfreq(dev); in min_freq_store() local
1573 if (!dev_pm_qos_request_active(&df->user_min_freq_req)) in min_freq_store()
1581 ret = dev_pm_qos_update_request(&df->user_min_freq_req, in min_freq_store()
1592 struct devfreq *df = to_devfreq(dev); in min_freq_show() local
1595 mutex_lock(&df->lock); in min_freq_show()
1596 devfreq_get_freq_range(df, &min_freq, &max_freq); in min_freq_show()
1597 mutex_unlock(&df->lock); in min_freq_show()
1606 struct devfreq *df = to_devfreq(dev); in max_freq_store() local
1614 if (!dev_pm_qos_request_active(&df->user_max_freq_req)) in max_freq_store()
1636 ret = dev_pm_qos_update_request(&df->user_max_freq_req, value); in max_freq_store()
1646 struct devfreq *df = to_devfreq(dev); in max_freq_show() local
1649 mutex_lock(&df->lock); in max_freq_show()
1650 devfreq_get_freq_range(df, &min_freq, &max_freq); in max_freq_show()
1651 mutex_unlock(&df->lock); in max_freq_show()
1661 struct devfreq *df = to_devfreq(d); in available_frequencies_show() local
1665 if (!df->profile) in available_frequencies_show()
1668 mutex_lock(&df->lock); in available_frequencies_show()
1670 for (i = 0; i < df->max_state; i++) in available_frequencies_show()
1672 "%lu ", df->freq_table[i]); in available_frequencies_show()
1674 mutex_unlock(&df->lock); in available_frequencies_show()
1688 struct devfreq *df = to_devfreq(dev); in trans_stat_show() local
1693 if (!df->profile) in trans_stat_show()
1695 max_state = df->max_state; in trans_stat_show()
1700 mutex_lock(&df->lock); in trans_stat_show()
1701 if (!df->stop_polling && in trans_stat_show()
1702 devfreq_update_status(df, df->previous_freq)) { in trans_stat_show()
1703 mutex_unlock(&df->lock); in trans_stat_show()
1706 mutex_unlock(&df->lock); in trans_stat_show()
1712 df->freq_table[i]); in trans_stat_show()
1717 if (df->freq_table[i] == df->previous_freq) in trans_stat_show()
1722 len += sprintf(buf + len, "%10lu:", df->freq_table[i]); in trans_stat_show()
1725 df->stats.trans_table[(i * max_state) + j]); in trans_stat_show()
1728 jiffies64_to_msecs(df->stats.time_in_state[i])); in trans_stat_show()
1732 df->stats.total_trans); in trans_stat_show()
1740 struct devfreq *df = to_devfreq(dev); in trans_stat_store() local
1743 if (!df->profile) in trans_stat_store()
1746 if (df->max_state == 0) in trans_stat_store()
1753 mutex_lock(&df->lock); in trans_stat_store()
1754 memset(df->stats.time_in_state, 0, (df->max_state * in trans_stat_store()
1755 sizeof(*df->stats.time_in_state))); in trans_stat_store()
1756 memset(df->stats.trans_table, 0, array3_size(sizeof(unsigned int), in trans_stat_store()
1757 df->max_state, in trans_stat_store()
1758 df->max_state)); in trans_stat_store()
1759 df->stats.total_trans = 0; in trans_stat_store()
1760 df->stats.last_update = get_jiffies_64(); in trans_stat_store()
1761 mutex_unlock(&df->lock); in trans_stat_store()
1784 struct devfreq *df = to_devfreq(dev); in polling_interval_show() local
1786 if (!df->profile) in polling_interval_show()
1789 return sprintf(buf, "%d\n", df->profile->polling_ms); in polling_interval_show()
1796 struct devfreq *df = to_devfreq(dev); in polling_interval_store() local
1800 if (!df->governor) in polling_interval_store()
1807 df->governor->event_handler(df, DEVFREQ_GOV_UPDATE_INTERVAL, &value); in polling_interval_store()
1817 struct devfreq *df = to_devfreq(dev); in timer_show() local
1819 if (!df->profile) in timer_show()
1822 return sprintf(buf, "%s\n", timer_name[df->profile->timer]); in timer_show()
1828 struct devfreq *df = to_devfreq(dev); in timer_store() local
1833 if (!df->governor || !df->profile) in timer_store()
1852 if (df->profile->timer == timer) { in timer_store()
1857 mutex_lock(&df->lock); in timer_store()
1858 df->profile->timer = timer; in timer_store()
1859 mutex_unlock(&df->lock); in timer_store()
1861 ret = df->governor->event_handler(df, DEVFREQ_GOV_STOP, NULL); in timer_store()
1864 __func__, df->governor->name, ret); in timer_store()
1868 ret = df->governor->event_handler(df, DEVFREQ_GOV_START, NULL); in timer_store()
1871 __func__, df->governor->name, ret); in timer_store()
1877 #define CREATE_SYSFS_FILE(df, name) \ argument
1880 ret = sysfs_create_file(&df->dev.kobj, &dev_attr_##name.attr); \
1882 dev_warn(&df->dev, \