]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
i2c: Remove I2C_SET_BUS()
authorSimon Glass <sjg@chromium.org>
Sun, 11 Aug 2024 14:50:42 +0000 (08:50 -0600)
committerHeiko Schocher <hs@denx.de>
Tue, 13 Aug 2024 04:14:55 +0000 (06:14 +0200)
This is very old, predating even the legacy I2C support, so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
drivers/power/power_i2c.c
include/i2c.h

index a871fc4198722c0b60cc02a07934f03108b7e908..c2fc1c6b42f31ef1db6d51c5663fb4af27b36d6b 100644 (file)
@@ -33,8 +33,6 @@ int pmic_reg_write(struct pmic *p, u32 reg, u32 val)
                       p->bus);
                return -ENXIO;
        }
-#else /* Non DM I2C support - will be removed */
-       I2C_SET_BUS(p->bus);
 #endif
 
        switch (pmic_i2c_tx_num) {
@@ -93,9 +91,6 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
                return -ENXIO;
        }
        ret = dm_i2c_read(dev, reg, buf, pmic_i2c_tx_num);
-#else /* Non DM I2C support - will be removed */
-       I2C_SET_BUS(p->bus);
-       ret = i2c_read(pmic_i2c_addr, reg, 1, buf, pmic_i2c_tx_num);
 #endif
        if (ret)
                return ret;
index 45ca3d63e3fde5fb0598be03586c9d9c84748c2d..1d1430b74a61451d0adff47659f09895fdf5085d 100644 (file)
@@ -954,13 +954,6 @@ static inline unsigned int I2C_GET_BUS(void)
        return I2C_MULTI_BUS ? i2c_get_bus_num() : 0;
 }
 
-static inline void I2C_SET_BUS(unsigned int bus) __attribute__((always_inline));
-static inline void I2C_SET_BUS(unsigned int bus)
-{
-       if (I2C_MULTI_BUS)
-               i2c_set_bus_num(bus);
-}
-
 /**
  * Find the I2C bus number by given a FDT I2C node.
  *