Browse Source

MLK-14605 mx7ulp: Modify the lpi2c seq number

Change the i2c alias seq number to align with device index. So in lpi2c
driver we don't need to add 4 to get the device index. This codes may not
valid on other platforms.

Signed-off-by: Ye Li <ye.li@nxp.com>
imx_v2017.03_4.9.11_1.0.0_ga
Ye Li 4 years ago
parent
commit
ce4339b757
2 changed files with 7 additions and 7 deletions
  1. +4
    -4
      arch/arm/dts/imx7ulp.dtsi
  2. +3
    -3
      drivers/i2c/imx_lpi2c.c

+ 4
- 4
arch/arm/dts/imx7ulp.dtsi View File

@ -29,10 +29,10 @@
serial2 = &lpuart6;
serial3 = &lpuart7;
usbphy0 = &usbphy1;
i2c0 = &lpi2c4;
i2c1 = &lpi2c5;
i2c2 = &lpi2c6;
i2c3 = &lpi2c7;
i2c4 = &lpi2c4;
i2c5 = &lpi2c5;
i2c6 = &lpi2c6;
i2c7 = &lpi2c7;
spi0 = &qspi1;
usb0 = &usbotg1;
};


+ 3
- 3
drivers/i2c/imx_lpi2c.c View File

@ -262,7 +262,7 @@ static int bus_i2c_set_bus_speed(struct udevice *bus, int speed)
bool mode;
int i;
clock_rate = imx_get_i2cclk(bus->seq + 4);
clock_rate = imx_get_i2cclk(bus->seq);
if (!clock_rate)
return -EPERM;
@ -419,14 +419,14 @@ static int imx_lpi2c_probe(struct udevice *bus)
i2c_bus->bus = bus;
/* power up i2c resource */
ret = init_i2c_power(bus->seq + 4);
ret = init_i2c_power(bus->seq);
if (ret) {
debug("init_i2c_power err = %d\n", ret);
return ret;
}
/* Enable clk, only i2c4-7 can be handled by A7 core */
ret = enable_i2c_clk(1, bus->seq + 4);
ret = enable_i2c_clk(1, bus->seq);
if (ret < 0)
return ret;


Loading…
Cancel
Save