summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-26 20:29:39 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:10:01 -0700
commitd744d5613639088246b27edb9ce91ccbd663e5a5 (patch)
tree864c6ef38e0c9a231d59ebc4c076fc3592e70a17 /drivers
parentbd768264fb6d8f91727ed6cad9c3a09c8021cbc5 (diff)
downloadu-boot-imx-d744d5613639088246b27edb9ce91ccbd663e5a5.zip
u-boot-imx-d744d5613639088246b27edb9ce91ccbd663e5a5.tar.gz
u-boot-imx-d744d5613639088246b27edb9ce91ccbd663e5a5.tar.bz2
dm: i2c: Add two more I2C init functions to the compatibility layer
These functions are useful in case the board calls them. Also fix a missing parameter caused by applying the wrong patch (actually I failed to send v2 and applied v1 by mistake). Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c-uclass-compat.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-uclass-compat.c b/drivers/i2c/i2c-uclass-compat.c
index 841ce05..223f238 100644
--- a/drivers/i2c/i2c-uclass-compat.c
+++ b/drivers/i2c/i2c-uclass-compat.c
@@ -22,8 +22,8 @@ static int i2c_compat_get_device(uint chip_addr, int alen,
return ret;
chip = dev_get_parent_platdata(*devp);
if (chip->offset_len != alen) {
- printf("Requested alen %d does not match chip offset_len %d\n",
- alen, chip->offset_len);
+ printf("I2C chip %x: requested alen %d does not match chip offset_len %d\n",
+ chip_addr, alen, chip->offset_len);
return -EADDRNOTAVAIL;
}
@@ -96,3 +96,13 @@ int i2c_set_bus_num(unsigned int bus)
return 0;
}
+
+void i2c_init(int speed, int slaveaddr)
+{
+ /* Nothing to do here - the init happens through driver model */
+}
+
+void board_i2c_init(const void *blob)
+{
+ /* Nothing to do here - the init happens through driver model */
+}