summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorJean-Jacques Hiblot <jjhiblot@ti.com>2018-12-11 21:56:34 +0300
committerHeiko Schocher <hs@denx.de>2018-12-12 08:06:14 +0300
commit22ecff594d9248f0a63e191e31d48f417a946d75 (patch)
treea117f5cf3760cf5a9e5193cc233f1b42990e6185 /drivers/i2c
parentee168783ae889cf449cee36cc1e51e108a210ed4 (diff)
downloadu-boot-22ecff594d9248f0a63e191e31d48f417a946d75.tar.xz
i2c: tegra: Fix regression by implementing a dummy probe_chip() callback
Commit f32a8007ef0f ("dm: i2c: Make i2c_get_chip_for_busnum() fail if the chip is not detected") introduced a regression for the NVIDIA Jetson TX2. For some reason the xfer callback of the tegra i2c driver doesn't support probing the I2C devices with a 0-length message. Fixing the regression by providing a dummy implementation of probe_chip() that does nothing. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/tegra186_bpmp_i2c.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c
index b4fff43269..793f3f59b5 100644
--- a/drivers/i2c/tegra186_bpmp_i2c.c
+++ b/drivers/i2c/tegra186_bpmp_i2c.c
@@ -85,6 +85,12 @@ static int tegra186_bpmp_i2c_xfer(struct udevice *dev, struct i2c_msg *msg,
return 0;
}
+static int tegra186_bpmp_probe_chip(struct udevice *bus, uint chip_addr,
+ uint chip_flags)
+{
+ return 0;
+}
+
static int tegra186_bpmp_i2c_probe(struct udevice *dev)
{
struct tegra186_bpmp_i2c *priv = dev_get_priv(dev);
@@ -101,6 +107,7 @@ static int tegra186_bpmp_i2c_probe(struct udevice *dev)
static const struct dm_i2c_ops tegra186_bpmp_i2c_ops = {
.xfer = tegra186_bpmp_i2c_xfer,
+ .probe_chip = tegra186_bpmp_probe_chip,
};
static const struct udevice_id tegra186_bpmp_i2c_ids[] = {