ARM: cpu topology: Add debugfs interface for cpu_power
[cmplus.git] / arch / arm / mach-omap2 / dvfs.h
blobb0a0cd688bb332ec6ab4fbbd6afe29fdb1586449
1 /*
2 * OMAP3/OMAP4 DVFS Management Routines
4 * Author: Vishwanath BS <vishwanath.bs@ti.com>
6 * Copyright (C) 2011 Texas Instruments, Inc.
7 * Vishwanath BS <vishwanath.bs@ti.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #ifndef __ARCH_ARM_MACH_OMAP2_DVFS_H
15 #define __ARCH_ARM_MACH_OMAP2_DVFS_H
16 #include <plat/omap_hwmod.h>
17 #include "voltage.h"
19 #ifdef CONFIG_PM
20 #include <linux/mutex.h>
21 extern struct mutex omap_dvfs_lock;
22 int omap_dvfs_register_device(struct device *dev, char *voltdm_name,
23 char *clk_name);
24 int omap_device_scale(struct device *req_dev, struct device *target_dev,
25 unsigned long rate);
27 static inline bool omap_dvfs_is_any_dev_scaling(void)
29 return mutex_is_locked(&omap_dvfs_lock);
31 #else
32 static inline int omap_dvfs_register_device(struct device *dev,
33 char *voltdm_name, char *clk_name)
35 return -EINVAL;
37 static inline int omap_device_scale(struct device *req_dev,
38 struct device *target_dev, unsigned long rate)
40 return -EINVAL;
42 static inline bool omap_dvfs_is_any_dev_scaling(void)
44 return false;
46 #endif
47 #endif