Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame^] | 1 | /* Copyright (c) 2002,2008-2011, Code Aurora Forum. All rights reserved. |
| 2 | * |
| 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 __ADRENO_DEBUGFS_H |
| 14 | #define __ADRENO_DEBUGFS_H |
| 15 | |
| 16 | #ifdef CONFIG_DEBUG_FS |
| 17 | |
| 18 | int adreno_debugfs_init(struct kgsl_device *device); |
| 19 | |
| 20 | extern int kgsl_pm_regs_enabled; |
| 21 | |
| 22 | static inline int kgsl_pmregs_enabled(void) |
| 23 | { |
| 24 | return kgsl_pm_regs_enabled; |
| 25 | } |
| 26 | |
| 27 | #else |
| 28 | static inline int adreno_debugfs_init(struct kgsl_device *device) |
| 29 | { |
| 30 | return 0; |
| 31 | } |
| 32 | |
| 33 | static inline int kgsl_pmregs_enabled(void) |
| 34 | { |
| 35 | /* If debugfs is turned off, then always print registers */ |
| 36 | return 1; |
| 37 | } |
| 38 | #endif |
| 39 | |
| 40 | #endif /* __ADRENO_DEBUGFS_H */ |