1 /* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
2  * Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved
3  */
4 #ifndef __MLX5_HWMON_H__
5 #define __MLX5_HWMON_H__
6 
7 #include <linux/mlx5/driver.h>
8 
9 #if IS_ENABLED(CONFIG_HWMON)
10 
11 int mlx5_hwmon_dev_register(struct mlx5_core_dev *mdev);
12 void mlx5_hwmon_dev_unregister(struct mlx5_core_dev *mdev);
13 
14 #else
mlx5_hwmon_dev_register(struct mlx5_core_dev * mdev)15 static inline int mlx5_hwmon_dev_register(struct mlx5_core_dev *mdev)
16 {
17 	return 0;
18 }
19 
mlx5_hwmon_dev_unregister(struct mlx5_core_dev * mdev)20 static inline void mlx5_hwmon_dev_unregister(struct mlx5_core_dev *mdev) {}
21 
22 #endif
23 
24 #endif /* __MLX5_HWMON_H__ */
25