Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3642169imm; Mon, 18 Jun 2018 01:24:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIfCcDD08rVaiYpIjKijYJAHESuGURfMaL+6t8ExXiRLMgqcMnyGpavzLb3IdPE8OHjgR51 X-Received: by 2002:a62:da07:: with SMTP id c7-v6mr12437234pfh.106.1529310250238; Mon, 18 Jun 2018 01:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529310250; cv=none; d=google.com; s=arc-20160816; b=aLpCrDLk24gf2TqqEm3J+8pPwOe4xE8/ZWKCZr0bi23mjaTef2a6osL8Y6lTcK0MUS zQ+s2n3FE7VbyheVhb4nD2neFJFEmun7Kely39QFKxXOEBMQQtj4h8v800Mn0USQ9d9R Grt+Vc58kFppa68L8Z1IQLiQzo8wGOSMU9Ay/HG2iFWzNNT13VjX6hpI3II6Os1T9R7q TcMAKudSaqU2U9Dq2wypywAqqVvcnSaPRyuoK/RAWFORJBgOiGUSIMMDGlq5efIGqnb7 g4NUlDIQzEAQwRWgoXCh2HXyQDNFdzJc7/f5MSJfmib3T54E5i2MGDfD8vKv7POZX8kR rQXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AkTbvzz3Aad8BakytM7ECTnuFzK2r+9UxuOguGpS9SA=; b=rVfcqJaVxJ/0BF2TnYzxVhu0e5mZ4Fy+wIqpFRc7t79tDidzBroAumU7trA49424ug ErBnm/Qv18SDJarZkYmFt0FQ8fb+/XMKEvrCsMEAxbzLaHDqOJFat7JyPuZvigdU3i2V RX0NuA0ZSxW5cW0+cygVD4v5cpGgtCRGU/+5VQWRN9pfo0pBAwAoi9VP4Z1hTVIpwJUQ 272jxgjRQUtzZkbuHygTM0sZGqoOX438y5IAQqD8flWq+meuva5AnOFe/TaQsvocyWP4 ZtAfZJf8Tf8o8kaaXk1OXXITFTPQYSdBzOwN2Jua783X0uDZWrX8cUEg8QAMsB87umgi UnpA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3-v6si11872741pgr.49.2018.06.18.01.23.56; Mon, 18 Jun 2018 01:24:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755171AbeFRIXV (ORCPT + 99 others); Mon, 18 Jun 2018 04:23:21 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55770 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753772AbeFRIXT (ORCPT ); Mon, 18 Jun 2018 04:23:19 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4082CBAD; Mon, 18 Jun 2018 08:23:18 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Lechner , Sekhar Nori , Sasha Levin Subject: [PATCH 4.16 139/279] ARM: davinci: board-da830-evm: fix GPIO lookup for MMC/SD Date: Mon, 18 Jun 2018 10:12:04 +0200 Message-Id: <20180618080614.587703496@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180618080608.851973560@linuxfoundation.org> References: <20180618080608.851973560@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sekhar Nori [ Upstream commit 51e9f12163223546bd3aa9f7af6817931f980da8 ] 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 Reviewed-by: David Lechner Signed-off-by: Sekhar Nori Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- arch/arm/mach-davinci/board-da830-evm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- 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), }, };