mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-28 05:17:20 +00:00
Merge tag 'for-v2019.10' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c bugfixes for 2019.10 - misc: i2c_eeprom: verify that the chip is functional at probe() - i2c: mxc_i2c: Remove i2c_idle_bus from probe - i2c-mux-gpio: Fix GPIO request flag issue
This commit is contained in:
commit
e7ce2e0483
3 changed files with 9 additions and 8 deletions
|
@ -106,7 +106,7 @@ static int i2c_mux_gpio_probe(struct udevice *dev)
|
|||
}
|
||||
|
||||
ret = gpio_request_list_by_name(dev, "mux-gpios", gpios, mux->n_gpios,
|
||||
GPIOD_IS_OUT_ACTIVE);
|
||||
GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
|
||||
if (ret <= 0) {
|
||||
dev_err(dev, "Failed to request mux-gpios\n");
|
||||
return ret;
|
||||
|
|
|
@ -917,13 +917,6 @@ static int mxc_i2c_probe(struct udevice *bus)
|
|||
}
|
||||
}
|
||||
|
||||
ret = i2c_idle_bus(i2c_bus);
|
||||
if (ret < 0) {
|
||||
/* Disable clk */
|
||||
enable_i2c_clk(0, bus->seq);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Pinmux settings are in board file now, until pinmux is supported,
|
||||
* we can set pinmux here in probe function.
|
||||
|
|
|
@ -84,6 +84,14 @@ static int i2c_eeprom_std_ofdata_to_platdata(struct udevice *dev)
|
|||
|
||||
static int i2c_eeprom_std_probe(struct udevice *dev)
|
||||
{
|
||||
u8 test_byte;
|
||||
int ret;
|
||||
|
||||
/* Verify that the chip is functional */
|
||||
ret = i2c_eeprom_read(dev, 0, &test_byte, 1);
|
||||
if (ret)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue