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 void vcap_port_debugfs_portno(struct device *dev, 22 struct dentry *parent, 23 struct vcap_control *vctrl, 24 struct net_device *ndev, 25 unsigned int portno); 26 27 /* Create a debugFS entry for a vcap instance */ 28 struct dentry *vcap_debugfs(struct device *dev, struct dentry *parent, 29 struct vcap_control *vctrl); 30 31 #else 32 33 static inline void vcap_port_debugfs(struct device *dev, struct dentry *parent, 34 struct vcap_control *vctrl, 35 struct net_device *ndev) 36 { 37 } 38 39 static inline void vcap_port_debugfs_portno(struct device *dev, 40 struct dentry *parent, 41 struct vcap_control *vctrl, 42 struct net_device *ndev, 43 unsigned int portno) 44 { 45 } 46 47 static inline struct dentry *vcap_debugfs(struct device *dev, 48 struct dentry *parent, 49 struct vcap_control *vctrl) 50 { 51 return NULL; 52 } 53 54 #endif 55 #endif /* __VCAP_API_DEBUGFS__ */ 56