From patchwork Tue Dec 11 18:56:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Jacques Hiblot X-Patchwork-Id: 1011318 X-Patchwork-Delegate: hs@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="EWvobQWC"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43Dq1G0Tjmz9s2P for ; Wed, 12 Dec 2018 05:56:50 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id C23E2C22817; Tue, 11 Dec 2018 18:56:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 73D4BC2221A; Tue, 11 Dec 2018 18:56:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C7C07C226C6; Tue, 11 Dec 2018 18:56:42 +0000 (UTC) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lists.denx.de (Postfix) with ESMTPS id 5442AC21F00 for ; Tue, 11 Dec 2018 18:56:42 +0000 (UTC) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wBBIubP5065038; Tue, 11 Dec 2018 12:56:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544554597; bh=6IUvS8YmYDb11Q/YBYEOCWD1/47eWjEECAvV04lY7Nw=; h=From:To:CC:Subject:Date; b=EWvobQWC7Ufytj4wTOKx1xE0AdUFZUddvNe7WF4g+rQr63vuVsS86FzYOV/+jhvLp XG6rWnIUpGuWEv4fcrrp5jSziGjsaXI8faFG7jg+B3U6+bZb1cfT/iE9/d4yNMZ7eS CLQPqEaLTST+3qvfF08JpVTG+r0TGyX0xGVU6VJE= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wBBIub4q112122 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 11 Dec 2018 12:56:37 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 11 Dec 2018 12:56:37 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Tue, 11 Dec 2018 12:56:37 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wBBIua4g025886; Tue, 11 Dec 2018 12:56:36 -0600 From: Jean-Jacques Hiblot To: , Date: Tue, 11 Dec 2018 19:56:34 +0100 Message-ID: <1544554594-7724-1-git-send-email-jjhiblot@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Cc: U-Boot@lists.denx.de Subject: [U-Boot] [PATCH] i2c: tegra: Fix regression by implementing a dummy probe_chip() callback X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" 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 Tested-by: Stephen Warren --- drivers/i2c/tegra186_bpmp_i2c.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/i2c/tegra186_bpmp_i2c.c b/drivers/i2c/tegra186_bpmp_i2c.c index b4fff43..793f3f5 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[] = {