diff options
author | Simon Glass <sjg@chromium.org> | 2015-02-05 21:41:33 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-02-12 10:35:33 -0700 |
commit | fffff7268b6c30dc7058d3615021628d4f60fac5 (patch) | |
tree | 5927701b5924f1a49b65f79339eaf02c706b0a3b /include/i2c.h | |
parent | ca88b9b93916f66c6737527aa955d2c1b4758080 (diff) | |
download | u-boot-fffff7268b6c30dc7058d3615021628d4f60fac5.tar.gz u-boot-fffff7268b6c30dc7058d3615021628d4f60fac5.tar.bz2 u-boot-fffff7268b6c30dc7058d3615021628d4f60fac5.zip |
dm: i2c: Make API accessible even without CONFIG_DM
Make the driver model I2C API available always, even if driver model
is not enabled. This allows for a 'soft' switch-over, where drivers can
use the new structures in code which is compiled but not yet used. This
makes migration easier in some cases.
Fix up the existing drivers which define their own 'struct i2c_msg'.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'include/i2c.h')
-rw-r--r-- | include/i2c.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/i2c.h b/include/i2c.h index 1635e9ac06..31b038991e 100644 --- a/include/i2c.h +++ b/include/i2c.h @@ -25,14 +25,13 @@ * enough as to be incompatible for compilation purposes. */ -#ifdef CONFIG_DM_I2C - enum dm_i2c_chip_flags { DM_I2C_CHIP_10BIT = 1 << 0, /* Use 10-bit addressing */ DM_I2C_CHIP_RD_ADDRESS = 1 << 1, /* Send address for each read byte */ DM_I2C_CHIP_WR_ADDRESS = 1 << 2, /* Send address for each write byte */ }; +struct udevice; /** * struct dm_i2c_chip - information about an i2c chip * @@ -439,8 +438,6 @@ int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len, int i2c_chip_ofdata_to_platdata(const void *blob, int node, struct dm_i2c_chip *chip); -#endif - #ifndef CONFIG_DM_I2C /* |