From patchwork Tue Apr 24 14:35:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 10360153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 54747602D6 for ; Tue, 24 Apr 2018 14:37:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1503028674 for ; Tue, 24 Apr 2018 14:37:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A01228DA3; Tue, 24 Apr 2018 14:37:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F91428674 for ; Tue, 24 Apr 2018 14:37:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qHsqFuoWJlGA8hr4pH71RpuIl4ArFUpP2w7CMoKPWVo=; b=UnnFWVpLBaPF1M RvAWlgYfjbxnbQ26gISsWcyZLGtmAT/p+Z+lbt0QGtCFbTsqxB/YPVbLuw/DEoiI+sEmhXLoQS6o3 yAlmjUa0MUVOAgcbL2cHvGHf9UIkPf0o4LIk6O9XFu545u50ga8sftGlE1h6Hoe1II+8wZf5xYQok dV3QVVIErB204DMynAnaK4/vXyKHwW5YEP9J4BorsGaMS9qn1HE9Z48EKVJ/e6gpFr0gS9IEoZMZF zEPdw2iZFRymL1BwJemksEH2FOho+lxg278nRO3G3AUNaK4kxZf2Sjtnf0Lh6jaKnyzJDkFY923Zn 6Fh49vSBf0Kgi4EtLW7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAz4e-0007Mw-LG; Tue, 24 Apr 2018 14:37:40 +0000 Received: from fllnx210.ext.ti.com ([198.47.19.17]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAz3B-0006gl-FO for linux-arm-kernel@lists.infradead.org; Tue, 24 Apr 2018 14:36:11 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3OEZFvr020692; Tue, 24 Apr 2018 09:35:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524580515; bh=hBzlhVILfgDF6KGAS4Yr4f0KYXTxAwkKNLdguD8MQfM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=EYrk1Z6X+XA8fUbKMTWXSodOJmoSgtVGhAYrr80zB3VnIaAMqlAumWXXbvXFqXtdT LpZk5ioo3tKdDj4tWq94FsiuR/VmHC1BCZ3E1BnE4a4tMLrscqJOgDsplMMV6oNO+A /0pKO1Ivl4AQkYwrtbROS1T5rb1R+8nIMdwuzMKc= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3OEZFid012822; Tue, 24 Apr 2018 09:35:15 -0500 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Tue, 24 Apr 2018 09:35:15 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Tue, 24 Apr 2018 09:35:15 -0500 Received: from psplinux063.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3OEZ7Q0022613; Tue, 24 Apr 2018 09:35:13 -0500 From: Sekhar Nori To: Linux ARM Mailing List Subject: [PATCH 3/4] ARM: davinci: fix GPIO lookup for I2C Date: Tue, 24 Apr 2018 20:05:05 +0530 Message-ID: <20180424143506.25793-4-nsekhar@ti.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180424143506.25793-1-nsekhar@ti.com> References: <20180424143506.25793-1-nsekhar@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180424_073609_634649_3D864136 X-CRM114-Status: GOOD ( 20.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bartosz Golaszewski , Adam Ford , David Lechner , Kevin Hilman Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The GPIO chip is called davinci_gpio.0 in legacy mode. Fix it, so that I2C can correctly lookup the recovery gpios. Note that it is the gpio-davinci driver that sets the gpiochip label to davinci_gpio.0. Also, the I2C device uses an id of 1 on DM644x and DM355. Fixes: e53537653791 ("i2c/ARM: davinci: Deep refactoring of I2C recovery") Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/board-dm355-evm.c | 6 +++--- arch/arm/mach-davinci/board-dm644x-evm.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c index cb30637d9eaf..14557f893798 100644 --- a/arch/arm/mach-davinci/board-dm355-evm.c +++ b/arch/arm/mach-davinci/board-dm355-evm.c @@ -110,11 +110,11 @@ static struct platform_device davinci_nand_device = { }; static struct gpiod_lookup_table i2c_recovery_gpiod_table = { - .dev_id = "i2c_davinci", + .dev_id = "i2c_davinci.1", .table = { - GPIO_LOOKUP("davinci_gpio", 15, "sda", + GPIO_LOOKUP("davinci_gpio.0", 15, "sda", GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), - GPIO_LOOKUP("davinci_gpio", 14, "scl", + GPIO_LOOKUP("davinci_gpio.0", 14, "scl", GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), }, }; diff --git a/arch/arm/mach-davinci/board-dm644x-evm.c b/arch/arm/mach-davinci/board-dm644x-evm.c index 5bf024784738..5b0b95e04cac 100644 --- a/arch/arm/mach-davinci/board-dm644x-evm.c +++ b/arch/arm/mach-davinci/board-dm644x-evm.c @@ -597,11 +597,11 @@ static struct i2c_board_info __initdata i2c_info[] = { }; static struct gpiod_lookup_table i2c_recovery_gpiod_table = { - .dev_id = "i2c_davinci", + .dev_id = "i2c_davinci.1", .table = { - GPIO_LOOKUP("davinci_gpio", 44, "sda", + GPIO_LOOKUP("davinci_gpio.0", 44, "sda", GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), - GPIO_LOOKUP("davinci_gpio", 43, "scl", + GPIO_LOOKUP("davinci_gpio.0", 43, "scl", GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN), }, };