xref: /linux/drivers/net/ethernet/microchip/sparx5/sparx5_vcap_debugfs.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /* Microchip Sparx5 Switch driver VCAP implementation
3  *
4  * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries.
5  */
6 
7 #ifndef __SPARX5_VCAP_DEBUGFS_H__
8 #define __SPARX5_VCAP_DEBUGFS_H__
9 
10 #include <linux/netdevice.h>
11 
12 #include <vcap_api.h>
13 #include <vcap_api_client.h>
14 
15 #if defined(CONFIG_DEBUG_FS)
16 
17 /* Provide port information via a callback interface */
18 int sparx5_port_info(struct net_device *ndev,
19 		     struct vcap_admin *admin,
20 		     struct vcap_output_print *out);
21 
22 #else
23 
24 static inline int sparx5_port_info(struct net_device *ndev,
25 				   struct vcap_admin *admin,
26 				   struct vcap_output_print *out)
27 {
28 	return 0;
29 }
30 
31 #endif
32 
33 #endif /* __SPARX5_VCAP_DEBUGFS_H__ */
34