xref: /linux/arch/arm/mach-omap1/i2c.h (revision e5a52fd2b8cdb700b3c07b030e050a49ef3156b9)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Helper module for board specific I2C bus registration
4  *
5  * Copyright (C) 2009 Nokia Corporation.
6  */
7 
8 #ifndef __ARCH_ARM_MACH_OMAP1_I2C_H
9 #define __ARCH_ARM_MACH_OMAP1_I2C_H
10 
11 struct i2c_board_info;
12 struct omap_i2c_bus_platform_data;
13 
14 int omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
15 			int bus_id);
16 
17 #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE)
18 extern int omap_register_i2c_bus(int bus_id, u32 clkrate,
19 				 struct i2c_board_info const *info,
20 				 unsigned len);
21 extern int omap_register_i2c_bus_cmdline(void);
22 #else
23 static inline int omap_register_i2c_bus(int bus_id, u32 clkrate,
24 				 struct i2c_board_info const *info,
25 				 unsigned len)
26 {
27 	return 0;
28 }
29 
30 static inline int omap_register_i2c_bus_cmdline(void)
31 {
32 	return 0;
33 }
34 #endif
35 
36 #endif /* __ARCH_ARM_MACH_OMAP1_I2C_H */
37