dm: i2c: Rename driver model I2C functions to permit compatibility

Add a dm_ prefix to driver model I2C functions so that we can keep the old
ones around.

This is a little unfortunate, but on reflection it is too difficult to
change the API. We can undo this rename when most boards and drivers are
converted to use driver model for I2C.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2015-01-12 18:02:07 -07:00
parent a08d643dbd
commit f9a4c2da72
12 changed files with 82 additions and 77 deletions

View File

@@ -23,7 +23,8 @@ unsigned long get_version(void)
# define install_hdlr irq_install_handler
# define free_hdlr irq_free_handler
#endif
#ifndef CONFIG_CMD_I2C
#if !defined(CONFIG_CMD_I2C) || \
(defined(CONFIG_DM_I2C) && !defined(CONFIG_DM_I2C_COMPAT))
# define i2c_write dummy
# define i2c_read dummy
#endif