From patchwork Tue Apr 24 14:35:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sekhar Nori X-Patchwork-Id: 10360145 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 CAB22602D6 for ; Tue, 24 Apr 2018 14:37:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB0B528DF3 for ; Tue, 24 Apr 2018 14:37:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AED2428E01; Tue, 24 Apr 2018 14:37:01 +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 2007C28DF3 for ; Tue, 24 Apr 2018 14:37:00 +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=MaJjelwpwK8E945RK6Q6UYFq9V0hxVDanC1+HKEB0A0=; b=WBtAcVicoqbNHO 4/u1TDHIExwyNGOsX+Uf6WQRMOFsmCYoeh9So8vs+nUr724K/lHY0KCHz0WyacsRKV0nVA1jqT4La uqNrz5MvHsLS9dlsHV0wZvWdR9EDFh5w10+YWI6AZKJyz1hfyiJTp48aBtEPrhaUYB6EzGNgsYhe1 g3wLvkP6zTSM1qHq/Ldb3uEcCUnhDJwOhO0uGsnoZSuwaL9xGG3pT93QlX0V4VkggrMeoanQnA//2 7e0omnGDdQbNatJXrbfvGp5NUspFtxeqn9AIcMntpYWK/9LW3q9bwB6Ss6878/NrNCaJ5p8bJdyD7 QJ6mYpnw7Gn1unKhEL8Q==; 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 1fAz3s-00070n-1p; Tue, 24 Apr 2018 14:36:52 +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-0006gM-FM 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 w3OEZB0H020667; Tue, 24 Apr 2018 09:35:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524580511; bh=R0HBxtwmWO5gJ/pai4qrDSwmXZ0fRKEpDtCrsX+2eK8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XU8HQuvko753BiN+OR3ghVcPLIfPSvxXTXI5TDqiB2rHiZ6ffmiJWDDX7KWrIWU54 DHQoBqUrp6RySPs50wkLFwFpy7BL0Q13ksPt4RBGzb5lW1ux6wcvKv+mjI+BIPWZ1D Iyy2634BuunNY+uHNv+g4Ke/wc38P7xxLfeMrbYM= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3OEZBxM012767; Tue, 24 Apr 2018 09:35:11 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE114.ent.ti.com (10.64.6.35) 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:11 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE103.ent.ti.com (10.64.6.24) 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:11 -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 w3OEZ7Pw022613; Tue, 24 Apr 2018 09:35:09 -0500 From: Sekhar Nori To: Linux ARM Mailing List Subject: [PATCH 1/4] ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD Date: Tue, 24 Apr 2018 20:05:03 +0530 Message-ID: <20180424143506.25793-2-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_654385_343F9405 X-CRM114-Status: GOOD ( 19.31 ) 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 mmc can correctly lookup the wp and cp gpios. Also fix the GPIO numbers as they are not offsets within a bank. Note that it is the gpio-davinci driver that sets the gpiochip label to davinci_gpio.0. Fixes: b5e1438cf98a ("ARM: davinci: da830-evm: use gpio descriptor for mmc pins") Reported-by: David Lechner Signed-off-by: Sekhar Nori Reviewed-by: David Lechner --- arch/arm/mach-davinci/board-da830-evm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-davinci/board-da830-evm.c b/arch/arm/mach-davinci/board-da830-evm.c index 004f9c8de032..d1e8ce7b4bd2 100644 --- a/arch/arm/mach-davinci/board-da830-evm.c +++ b/arch/arm/mach-davinci/board-da830-evm.c @@ -205,12 +205,17 @@ static const short da830_evm_mmc_sd_pins[] = { -1 }; +#define DA830_MMCSD_WP_PIN GPIO_TO_PIN(2, 1) +#define DA830_MMCSD_CD_PIN GPIO_TO_PIN(2, 2) + static struct gpiod_lookup_table mmc_gpios_table = { .dev_id = "da830-mmc.0", .table = { /* gpio chip 1 contains gpio range 32-63 */ - GPIO_LOOKUP("davinci_gpio.1", 2, "cd", GPIO_ACTIVE_LOW), - GPIO_LOOKUP("davinci_gpio.1", 1, "wp", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_CD_PIN, "cd", + GPIO_ACTIVE_LOW), + GPIO_LOOKUP("davinci_gpio.0", DA830_MMCSD_WP_PIN, "wp", + GPIO_ACTIVE_LOW), }, };