Duy Truong | e833aca | 2013-02-12 13:35:08 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2002,2008-2011, The Linux Foundation. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 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 | |
| 14 | #ifndef _KGSL_DEBUGFS_H |
| 15 | #define _KGSL_DEBUGFS_H |
| 16 | |
| 17 | struct kgsl_device; |
Jeremy Gebben | ddf9301 | 2012-09-25 10:57:38 -0600 | [diff] [blame] | 18 | struct kgsl_process_private; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 19 | |
| 20 | #ifdef CONFIG_DEBUG_FS |
| 21 | void kgsl_core_debugfs_init(void); |
Jordan Crouse | d8f1c6b | 2011-10-04 09:31:29 -0600 | [diff] [blame] | 22 | void kgsl_core_debugfs_close(void); |
| 23 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 24 | void kgsl_device_debugfs_init(struct kgsl_device *device); |
| 25 | |
| 26 | extern struct dentry *kgsl_debugfs_dir; |
| 27 | static inline struct dentry *kgsl_get_debugfs_dir(void) |
| 28 | { |
| 29 | return kgsl_debugfs_dir; |
| 30 | } |
| 31 | |
Jeremy Gebben | ddf9301 | 2012-09-25 10:57:38 -0600 | [diff] [blame] | 32 | int kgsl_process_init_debugfs(struct kgsl_process_private *); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 33 | #else |
| 34 | static inline void kgsl_core_debugfs_init(void) { } |
| 35 | static inline void kgsl_device_debugfs_init(struct kgsl_device *device) { } |
Jordan Crouse | d8f1c6b | 2011-10-04 09:31:29 -0600 | [diff] [blame] | 36 | static inline void kgsl_core_debugfs_close(void) { } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 37 | static inline struct dentry *kgsl_get_debugfs_dir(void) { return NULL; } |
Jeremy Gebben | ddf9301 | 2012-09-25 10:57:38 -0600 | [diff] [blame] | 38 | static inline int kgsl_process_init_debugfs(struct kgsl_process_private *) |
| 39 | { |
| 40 | return 0; |
| 41 | } |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 42 | |
| 43 | #endif |
| 44 | |
| 45 | #endif |