i2c.h 560 B

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