1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2018 Mellanox Technologies. All rights reserved */
3 
4 #ifndef _MLXSW_CORE_ENV_H
5 #define _MLXSW_CORE_ENV_H
6 
7 struct ethtool_modinfo;
8 struct ethtool_eeprom;
9 
10 int mlxsw_env_module_temp_thresholds_get(struct mlxsw_core *core, int module,
11 					 int off, int *temp);
12 
13 int mlxsw_env_get_module_info(struct mlxsw_core *mlxsw_core, int module,
14 			      struct ethtool_modinfo *modinfo);
15 
16 int mlxsw_env_get_module_eeprom(struct net_device *netdev,
17 				struct mlxsw_core *mlxsw_core, int module,
18 				struct ethtool_eeprom *ee, u8 *data);
19 
20 int
21 mlxsw_env_module_overheat_counter_get(struct mlxsw_core *mlxsw_core, u8 module,
22 				      u64 *p_counter);
23 int mlxsw_env_init(struct mlxsw_core *core, struct mlxsw_env **p_env);
24 void mlxsw_env_fini(struct mlxsw_env *env);
25 
26 #endif
27