summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-uniphier-f.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-uniphier-f.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-uniphier-f.c')
-rw-r--r--drivers/i2c/i2c-uniphier-f.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/i2c/i2c-uniphier-f.c b/drivers/i2c/i2c-uniphier-f.c
index b0d30f7..6707edd 100644
--- a/drivers/i2c/i2c-uniphier-f.c
+++ b/drivers/i2c/i2c-uniphier-f.c
@@ -145,16 +145,6 @@ static int uniphier_fi2c_remove(struct udevice *dev)
return 0;
}
-static int uniphier_fi2c_child_pre_probe(struct udevice *dev)
-{
- struct dm_i2c_chip *i2c_chip = dev_get_parentdata(dev);
-
- if (dev->of_offset == -1)
- return 0;
- return i2c_chip_ofdata_to_platdata(gd->fdt_blob, dev->of_offset,
- i2c_chip);
-}
-
static int wait_for_irq(struct uniphier_fi2c_dev *dev, u32 flags,
bool *stop)
{
@@ -372,8 +362,6 @@ U_BOOT_DRIVER(uniphier_fi2c) = {
.of_match = uniphier_fi2c_of_match,
.probe = uniphier_fi2c_probe,
.remove = uniphier_fi2c_remove,
- .per_child_auto_alloc_size = sizeof(struct dm_i2c_chip),
- .child_pre_probe = uniphier_fi2c_child_pre_probe,
.priv_auto_alloc_size = sizeof(struct uniphier_fi2c_dev),
.ops = &uniphier_fi2c_ops,
};