From patchwork Tue Feb 25 17:34:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 3718111 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 6EC4EBF13A for ; Tue, 25 Feb 2014 17:37:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A3A50201D3 for ; Tue, 25 Feb 2014 17:37:31 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B8BFF200EC for ; Tue, 25 Feb 2014 17:37:30 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WILvb-0008Hv-5I; Tue, 25 Feb 2014 17:36:23 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WILvN-0001L0-NY; Tue, 25 Feb 2014 17:36:09 +0000 Received: from vps0.lunn.ch ([178.209.37.122]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WILuy-0001F4-AR for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2014 17:35:46 +0000 Received: from lunn by vps0.lunn.ch with local (Exim 4.80) (envelope-from ) id 1WILti-0001kD-3q; Tue, 25 Feb 2014 18:34:26 +0100 From: Andrew Lunn To: Jason Cooper , Sebastian Hesselbarth , Gregory Clement , Thomas Petazzoni Subject: [PATCH v3 2/5] ARM: kirkwood: Add i2c alias so setting bus number Date: Tue, 25 Feb 2014 18:34:00 +0100 Message-Id: <1393349643-6652-3-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393349643-6652-1-git-send-email-andrew@lunn.ch> References: <1393349643-6652-1-git-send-email-andrew@lunn.ch> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140225_123544_727673_5AAB74C4 X-CRM114-Status: GOOD ( 10.12 ) X-Spam-Score: -1.9 (-) Cc: Andrew Lunn , linux ARM X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When using platform_driver instantiation, the i2c bus was given bus number 0. The kirkwood-t5325 audio driver has this bus number hard coded for the address of the codec. However by default device tree i2c busses are dynamically allocated a bus number, starting from 1. Thus the kirkwood-t5325 cannot find its audio codec. By adding an alias in the DT file we can control the bus number and set it to 0. The codec can then be found. Signed-off-by: Andrew Lunn --- arch/arm/boot/dts/kirkwood.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi index 5a86fa820e12..90384587c278 100644 --- a/arch/arm/boot/dts/kirkwood.dtsi +++ b/arch/arm/boot/dts/kirkwood.dtsi @@ -24,6 +24,7 @@ aliases { gpio0 = &gpio0; gpio1 = &gpio1; + i2c0 = &i2c0; }; mbus { @@ -111,7 +112,7 @@ clocks = <&gate_clk 7>; }; - i2c@11000 { + i2c0: i2c@11000 { compatible = "marvell,mv64xxx-i2c"; reg = <0x11000 0x20>; #address-cells = <1>;