blob: 1a6f2d99bc7ab2eac7a1549a0b82f448373f47f6 [file] [log] [blame]
Duy Truong790f06d2013-02-13 16:38:12 -08001/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
Praveen Chidambaram696a5612012-05-25 17:29:11 -06002 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12
13#ifndef __ARCH_ARM_MACH_MSM_MACH_CPUFREQ_H
14#define __ARCH_ARM_MACH_MSM_MACH_CPUFREQ_H
15
16#define MSM_CPUFREQ_NO_LIMIT 0xFFFFFFFF
17
18#ifdef CONFIG_CPU_FREQ_MSM
19
20/**
21 * msm_cpufreq_set_freq_limit() - Set max/min freq limits on cpu
22 *
23 * @cpu: The cpu core for which the limits apply
24 * @max: The max frequency allowed
25 * @min: The min frequency allowed
26 *
27 * If the @max or @min is set to MSM_CPUFREQ_NO_LIMIT, the limit
28 * will default to the CPUFreq limit.
29 *
30 * returns 0 on success, errno on failure
31 */
32extern int msm_cpufreq_set_freq_limits(
33 uint32_t cpu, uint32_t min, uint32_t max);
34#else
35static inline int msm_cpufreq_set_freq_limits(
36 uint32_t cpu, uint32_t min, uint32_t max)
37{
38 return -ENOSYS;
39}
40#endif
41
42#endif /* __ARCH_ARM_MACH_MSM_MACH_CPUFREQ_H */