ARM: tegra: add sysfs support for tegra cpuquiet driver
[firefly-linux-kernel-4.4.55.git] / drivers / cpuquiet / cpuquiet.h
1 /*
2  * Copyright (c) 2012 NVIDIA CORPORATION.  All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 2 of the License.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
11  * more details.
12  *
13  * You should have received a copy of the GNU General Public License along
14  * with this program; if not, write to the Free Software Foundation, Inc.,
15  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16  *
17  */
18
19 #ifndef __DRIVER_CPUQUIET_H
20 #define __DRIVER_CPUQUIET_H
21
22 #include <linux/sysdev.h>
23
24 extern struct mutex cpuquiet_lock;
25 extern struct cpuquiet_governor *cpuquiet_curr_governor;
26 extern struct list_head cpuquiet_governors;
27 int cpuquiet_add_class_sysfs(struct sysdev_class *cls);
28 struct cpuquiet_governor *cpuquiet_find_governor(const char *str);
29 int cpuquiet_switch_governor(struct cpuquiet_governor *gov);
30 struct cpuquiet_governor *cpuquiet_get_first_governor(void);
31 struct cpuquiet_driver *cpuquiet_get_driver(void);
32 void cpuquiet_add_dev(struct sys_device *sys_dev, unsigned int cpu);
33 void cpuquiet_remove_dev(unsigned int cpu);
34 int cpuquiet_cpu_kobject_init(struct kobject *kobj, struct kobj_type *type,
35                                 char *name, int cpu);
36 #endif