Lines Matching refs:devfreq
22 static int devfreq_userspace_func(struct devfreq *df, unsigned long *freq) in devfreq_userspace_func()
37 struct devfreq *devfreq = to_devfreq(dev); in set_freq_store() local
42 mutex_lock(&devfreq->lock); in set_freq_store()
43 data = devfreq->governor_data; in set_freq_store()
48 err = update_devfreq(devfreq); in set_freq_store()
51 mutex_unlock(&devfreq->lock); in set_freq_store()
58 struct devfreq *devfreq = to_devfreq(dev); in set_freq_show() local
62 mutex_lock(&devfreq->lock); in set_freq_show()
63 data = devfreq->governor_data; in set_freq_show()
69 mutex_unlock(&devfreq->lock); in set_freq_show()
83 static int userspace_init(struct devfreq *devfreq) in userspace_init() argument
94 devfreq->governor_data = data; in userspace_init()
96 err = sysfs_create_group(&devfreq->dev.kobj, &dev_attr_group); in userspace_init()
101 static void userspace_exit(struct devfreq *devfreq) in userspace_exit() argument
107 if (devfreq->dev.kobj.sd) in userspace_exit()
108 sysfs_remove_group(&devfreq->dev.kobj, &dev_attr_group); in userspace_exit()
110 kfree(devfreq->governor_data); in userspace_exit()
111 devfreq->governor_data = NULL; in userspace_exit()
114 static int devfreq_userspace_handler(struct devfreq *devfreq, in devfreq_userspace_handler() argument
121 ret = userspace_init(devfreq); in devfreq_userspace_handler()
124 userspace_exit(devfreq); in devfreq_userspace_handler()