summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-uclass-compat.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:27:13 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:56 -0700
commite6f66ec0e757b49d39885303a94784a342803dd2 (patch)
treef53b145baa811fdcfffdc1fee016e866e480b8c7 /drivers/i2c/i2c-uclass-compat.c
parentd0cff03e187cc1de3d6b477b92c376aae27c95e8 (diff)
downloadu-boot-imx-e6f66ec0e757b49d39885303a94784a342803dd2.zip
u-boot-imx-e6f66ec0e757b49d39885303a94784a342803dd2.tar.gz
u-boot-imx-e6f66ec0e757b49d39885303a94784a342803dd2.tar.bz2
dm: i2c: Move slave details to child platdata
At present we go through various contortions to store the I2C's chip address in its private data. This only exists when the chip is active so must be set up when it is probed. Until the device is probed we don't actually record what address it will appear on. However, now that we can support per-child platform data, we can use that instead. This allows us to set up the address when the child is bound, and avoid the messy contortions. Unfortunately this is a fairly large change and it seems to be difficult to break it down further. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Diffstat (limited to 'drivers/i2c/i2c-uclass-compat.c')
-rw-r--r--drivers/i2c/i2c-uclass-compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-uclass-compat.c b/drivers/i2c/i2c-uclass-compat.c
index c29fc89..11239da 100644
--- a/drivers/i2c/i2c-uclass-compat.c
+++ b/drivers/i2c/i2c-uclass-compat.c
@@ -20,7 +20,7 @@ static int i2c_compat_get_device(uint chip_addr, int alen,
ret = i2c_get_chip_for_busnum(cur_busnum, chip_addr, devp);
if (ret)
return ret;
- chip = dev_get_parentdata(*devp);
+ 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);