1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* Copyright (C) 2022 Microchip Technology Inc. and its subsidiaries.
3  * Microchip VCAP API
4  */
5 
6 #ifndef __VCAP_API_DEBUGFS__
7 #define __VCAP_API_DEBUGFS__
8 
9 #include <linux/types.h>
10 #include <linux/debugfs.h>
11 #include <linux/netdevice.h>
12 
13 #include "vcap_api.h"
14 
15 #if defined(CONFIG_DEBUG_FS)
16 
17 void vcap_port_debugfs(struct device *dev, struct dentry *parent,
18 		       struct vcap_control *vctrl,
19 		       struct net_device *ndev);
20 
21 /* Create a debugFS entry for a vcap instance */
22 struct dentry *vcap_debugfs(struct device *dev, struct dentry *parent,
23 			    struct vcap_control *vctrl);
24 
25 #else
26 
vcap_port_debugfs(struct device * dev,struct dentry * parent,struct vcap_control * vctrl,struct net_device * ndev)27 static inline void vcap_port_debugfs(struct device *dev, struct dentry *parent,
28 				     struct vcap_control *vctrl,
29 				     struct net_device *ndev)
30 {
31 }
32 
vcap_debugfs(struct device * dev,struct dentry * parent,struct vcap_control * vctrl)33 static inline struct dentry *vcap_debugfs(struct device *dev,
34 					  struct dentry *parent,
35 					  struct vcap_control *vctrl)
36 {
37 	return NULL;
38 }
39 
40 #endif
41 #endif /* __VCAP_API_DEBUGFS__ */
42