1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /* Copyright (c) 2016-2018 Mellanox Technologies. All rights reserved */
3 
4 #ifndef _MLXSW_I2C_H
5 #define _MLXSW_I2C_H
6 
7 #include <linux/i2c.h>
8 
9 #if IS_ENABLED(CONFIG_MLXSW_I2C)
10 
11 int mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver);
12 void mlxsw_i2c_driver_unregister(struct i2c_driver *i2c_driver);
13 
14 #else
15 
16 static inline int
17 mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver)
18 {
19 	return -ENODEV;
20 }
21 
22 static inline void
23 mlxsw_i2c_driver_unregister(struct i2c_driver *i2c_driver)
24 {
25 }
26 
27 #endif
28 
29 #endif
30