From patchwork Fri Nov 24 14:04:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip Oberfichtner X-Patchwork-Id: 1868164 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=dQTjxptb; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.a=rsa-sha256 header.s=phobos-20191101 header.b=BU30aKP+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ScGvd1Z6fz1yRy for ; Sat, 25 Nov 2023 01:05:01 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 93310875EE; Fri, 24 Nov 2023 15:04:55 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1700834695; bh=5XtfQnX27as1C0+Yke6fWGh7Zvl9z2MTuVoZXGQkxAY=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=dQTjxptb2AU3j2o8pm9pl6Q/tGtkQMXKZEwNUslI8NMbJuQ9Sm50meHgErU83UMEs zxksOnjbP21E25/O7GtjgQ1iM+EhlXjyLdsTPVNsZTw6zpo2UJ0oC2KUNKnE0PcKpD 0F/bCe+GN/GwcHxqNt/94ZjMRipJH8IJue+J3BS78r/RGkW4TDkzdMQylHeRKiHzrt Vu2UQFe4aL7KRTwywq9uKJ8o0heXhO/CyrUETnsB+fI8qCgGqkiXGEfbpMxXQDvo4G 3GlrmN+nxHyPXRML5BJPcsUB8s6r67K+XkfQe+p+MVqbO5+Hf5lky3L/9cMkkLnw8N kUraW6OvmwZIQ== Received: from localhost (unknown [IPv6:2a01:cb18:989:a700:90fa:3f82:fe6a:48f9]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pro@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 731368711E; Fri, 24 Nov 2023 15:04:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1700834693; bh=5XtfQnX27as1C0+Yke6fWGh7Zvl9z2MTuVoZXGQkxAY=; h=From:To:Cc:Subject:Date:From; b=BU30aKP+Yu9w8lUKodFicpVAI+jG/hgIsZDB5ibVSxz7pakEGEUgyfZhBbOTDVXyt ZMTyS8nhksKFQtjcOLkSb4tk5ZKhHKHK33l3dJkEqbXZoLYWliSJPVI6DNXDK6Lqyz rtmmntPtoYTRs1RcXM2WTNIZzZPRlTAPvRZicx+9EKjqRoQRPd20fzLyH/rqqFp0SZ s7fzIFR0pW1KnWjIPakErSvVqZNx83kbUMv6DUmQYehzlrk/S/lil7HmdNTzryqOQz LMCljcXdELSuqfmVFfZnclXxGPmIKqCz72FZyz6zfmiF/rPYcDF9lQ76Y4yOi9A3Ce fLgJLKjZ6NToQ== From: Philip Oberfichtner To: u-boot@lists.denx.de Cc: hs@denx.de, sjg@chromium.org, trini@konsulko.com, Philip Oberfichtner Subject: [PATCH 1/1] i2c: Bugfix in i2c_get_chip_by_phandle() Date: Fri, 24 Nov 2023 15:04:01 +0100 Message-Id: <20231124140400.32027-1-pro@denx.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The "i2cbcdev" sneaked in when implementing this function for the bootcounter use case. Obviously the intention was to use prop_name instead. Fixes: b483552773 (i2c: Implement i2c_get_chip_by_phandle()) Signed-off-by: Philip Oberfichtner Acked-by: Heiko Schocher --- drivers/i2c/i2c-uclass.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c index d0db25dcc0..3cbd4a81a5 100644 --- a/drivers/i2c/i2c-uclass.c +++ b/drivers/i2c/i2c-uclass.c @@ -428,7 +428,7 @@ int i2c_get_chip_by_phandle(const struct udevice *parent, const char *prop_name, goto err_exit; } - ret = dev_read_u32(parent, "i2cbcdev", &phandle); + ret = dev_read_u32(parent, prop_name, &phandle); if (ret) goto err_exit;