Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3704974imm; Mon, 18 Jun 2018 02:39:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIu8+3Is9ENCNNVc/f6YCx/6oWPesR5YD9NLsZ/SqnJqNCyc/fea0KvcLP9re/JBiJmaCzV X-Received: by 2002:a65:6559:: with SMTP id a25-v6mr10083301pgw.82.1529314755018; Mon, 18 Jun 2018 02:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529314754; cv=none; d=google.com; s=arc-20160816; b=uRYAwwE13KQzkOZV8JEDDEcfzz+ZHin2jZQ1IHQ9x6nm2owlj5jHOlZeUkGvo5IVbM 6plc2GDDLa4g5sv2MTWQFXUusJdqlARBAr6adL0w1IGIiDtrD9F0qRjpAq+LT3O9384S G7HhiVthRtBbyCBgVMASzP12/kOM4MWMs4YBzJwZPdji7baB+T9NXZ447M9RzWl/Pvw7 24Y5rFmET2G74+jo02stA5zVS0NYzDRbSN2RG06BO4tEFACH9afDfpAkbEvsn5Vf3F9P 71huAxCegIN4uABap3dQ47l3RsTrYngGLXcal4v2w1L/4q/jXn7nhjeMw+lnSOTpuhuB h0Iw== 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=HlbqlknRZXzykgHl1EnAtpB4D8L0CXFDOULBUmO7/qs=; b=ibNzrc6Dl8BEgWaCI0ZgqDfsnlRjGXyK0uIUjIZF6lHiDNuvy6M8cVDpKFqJn2WVmz 2tnLto4fR8wsD5CBKSu1E5GTQt3JYInb+24e2zAi08GwWVeFtUi7a/Cj1GHF4XgHAq2r HgNXx6xUrjbYUkAniSSUCTPRa/X0T6l/0JOfot09+t2op/LEbfexd1ZOo1pvJ0Ig1lTV EI7H+EV6Wcv0fK92iZPqwyriAEpuF4MBchx92te+cFTzCoRBOfGVcTPORzHggqc+QYAi 7VnSMbVNOURIJo+l8muBZ6CLriN2WprVc5el16WybLzb7DbuFTRUH3KZMpj01Km+YQMQ c4DQ== 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 g7-v6si14280063plt.149.2018.06.18.02.39.01; Mon, 18 Jun 2018 02:39:14 -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 S932762AbeFRIX0 (ORCPT + 99 others); Mon, 18 Jun 2018 04:23:26 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55780 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755091AbeFRIXV (ORCPT ); Mon, 18 Jun 2018 04:23:21 -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 01013C7A; Mon, 18 Jun 2018 08:23:20 +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 140/279] ARM: davinci: board-da850-evm: fix GPIO lookup for MMC/SD Date: Mon, 18 Jun 2018 10:12:05 +0200 Message-Id: <20180618080614.628901275@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 67c6b6ff221f807180aea6dd597246f87e1dd98a ] 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: bdf0e8364fd3 ("ARM: davinci: da850-evm: use gpio descriptor for mmc pins") 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-da850-evm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c @@ -763,12 +763,17 @@ static const short da850_evm_mcasp_pins[ -1 }; +#define DA850_MMCSD_CD_PIN GPIO_TO_PIN(4, 0) +#define DA850_MMCSD_WP_PIN GPIO_TO_PIN(4, 1) + static struct gpiod_lookup_table mmc_gpios_table = { .dev_id = "da830-mmc.0", .table = { /* gpio chip 2 contains gpio range 64-95 */ - GPIO_LOOKUP("davinci_gpio.2", 0, "cd", GPIO_ACTIVE_LOW), - GPIO_LOOKUP("davinci_gpio.2", 1, "wp", GPIO_ACTIVE_LOW), + GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_CD_PIN, "cd", + GPIO_ACTIVE_LOW), + GPIO_LOOKUP("davinci_gpio.0", DA850_MMCSD_WP_PIN, "wp", + GPIO_ACTIVE_LOW), }, };