18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* Copyright (c) 2016-2018 Mellanox Technologies. All rights reserved */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#ifndef _MLXSW_I2C_H 58c2ecf20Sopenharmony_ci#define _MLXSW_I2C_H 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/i2c.h> 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#if IS_ENABLED(CONFIG_MLXSW_I2C) 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciint mlxsw_i2c_driver_register(struct i2c_driver *i2c_driver); 128c2ecf20Sopenharmony_civoid mlxsw_i2c_driver_unregister(struct i2c_driver *i2c_driver); 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci#else 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_cistatic inline int 178c2ecf20Sopenharmony_cimlxsw_i2c_driver_register(struct i2c_driver *i2c_driver) 188c2ecf20Sopenharmony_ci{ 198c2ecf20Sopenharmony_ci return -ENODEV; 208c2ecf20Sopenharmony_ci} 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_cistatic inline void 238c2ecf20Sopenharmony_cimlxsw_i2c_driver_unregister(struct i2c_driver *i2c_driver) 248c2ecf20Sopenharmony_ci{ 258c2ecf20Sopenharmony_ci} 268c2ecf20Sopenharmony_ci 278c2ecf20Sopenharmony_ci#endif 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci#endif 30