summaryrefslogtreecommitdiff
path: root/drivers/i2c/i2c-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 16:24:03 +0300
committerSimon Glass <sjg@chromium.org>2021-09-25 18:46:15 +0300
commit414cc15144f69b66d12aa8881192e34862bc6042 (patch)
tree07a154a1f32dca9f051e5809fa70d8a81b4b324f /drivers/i2c/i2c-uclass.c
parenteaad01a3d018a8a5b1003ab2d28e9e23e2b2db3f (diff)
downloadu-boot-414cc15144f69b66d12aa8881192e34862bc6042.tar.xz
treewide: Simply conditions with the new OF_REAL
Use this new Kconfig to simplify the compilation conditions where appropriate. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c/i2c-uclass.c')
-rw-r--r--drivers/i2c/i2c-uclass.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index db1c9d9462..71bc2b5b8a 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -633,7 +633,7 @@ int i2c_deblock(struct udevice *bus)
return ops->deblock(bus);
}
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip)
{
int addr;
@@ -655,7 +655,7 @@ int i2c_chip_of_to_plat(struct udevice *dev, struct dm_i2c_chip *chip)
static int i2c_pre_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
struct dm_i2c_bus *i2c = dev_get_uclass_priv(dev);
unsigned int max = 0;
ofnode node;
@@ -678,7 +678,7 @@ static int i2c_pre_probe(struct udevice *dev)
static int i2c_post_probe(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
struct dm_i2c_bus *i2c = dev_get_uclass_priv(dev);
i2c->speed_hz = dev_read_u32_default(dev, "clock-frequency",
@@ -692,7 +692,7 @@ static int i2c_post_probe(struct udevice *dev)
static int i2c_child_post_bind(struct udevice *dev)
{
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
struct dm_i2c_chip *plat = dev_get_parent_plat(dev);
if (!dev_has_ofnode(dev))
@@ -709,7 +709,7 @@ static int i2c_post_bind(struct udevice *dev)
debug("%s: %s, seq=%d\n", __func__, dev->name, dev_seq(dev));
-#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_REAL)
ret = dm_scan_fdt_dev(dev);
#endif
return ret;