i2c.h (560B)
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 11int mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver); 12void mlxsw_i2c_driver_unregister(struct i2c_driver *i2c_driver); 13 14#else 15 16static inline int 17mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver) 18{ 19 return -ENODEV; 20} 21 22static inline void 23mlxsw_i2c_driver_unregister(struct i2c_driver *i2c_driver) 24{ 25} 26 27#endif 28 29#endif