From patchwork Tue Jun 30 14:15:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Osipenko X-Patchwork-Id: 6696551 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3C1F9C05AC for ; Tue, 30 Jun 2015 14:23:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E3AC203E3 for ; Tue, 30 Jun 2015 14:23:13 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 910FF203B5 for ; Tue, 30 Jun 2015 14:23:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9wOo-0008MA-5b; Tue, 30 Jun 2015 14:20:34 +0000 Received: from mail-la0-x235.google.com ([2a00:1450:4010:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z9wOk-000884-AX for linux-arm-kernel@lists.infradead.org; Tue, 30 Jun 2015 14:20:31 +0000 Received: by lagx9 with SMTP id x9so15597925lag.1 for ; Tue, 30 Jun 2015 07:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=pAav6mpeLh1JxFg51DU/5Zw/tAP0qVctO3wsIw4yYZE=; b=kOImSdNWcg/qE7+uCCqeRDoPApazAhDaY3DxkuOStqPYSIY1EbWDi7w1Fn1sHGxV9C 2QI8BVyCdYHcpPgxgtISTDt6SbKO+zO38n04999ORg3PYGrTGJbPlte2MURDPEMgwMpG zjRf+/mCBOlrGKhFk76CUJdcW8MBBdTTijQ/6JlsKYl9jtZIJKBZriphR60lIizQ+WRW sTw0pqWAcOLP/P4C/9gg9DlAq8OGAsi9mxyReK55TBWtLlbCM4OF8MiJQqcM1MUE4Hgu EE3WcE26MgtWOqWJpZSCC/dnirbOPx2FpL/ECchpgci+ZmyT9huuUtT4ZQQhUchyHZ7X mtAA== X-Received: by 10.152.36.161 with SMTP id r1mr19959632laj.88.1435674008085; Tue, 30 Jun 2015 07:20:08 -0700 (PDT) Received: from localhost.localdomain ([46.138.6.114]) by mx.google.com with ESMTPSA id lb8sm11693987lbc.31.2015.06.30.07.20.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jun 2015 07:20:07 -0700 (PDT) From: Dmitry Osipenko To: Stephen Warren , Thierry Reding , Alexandre Courbot , Marc Dietrich Subject: [PATCH v2] ARM: tegra: paz00: use con_id's to refer GPIO's in gpiod_lookup table Date: Tue, 30 Jun 2015 17:15:50 +0300 Message-Id: <1435673759-11996-1-git-send-email-digetx@gmail.com> X-Mailer: git-send-email 2.4.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150630_072030_562725_8F37B04F X-CRM114-Status: GOOD ( 13.21 ) X-Spam-Score: -2.7 (--) Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-tegra@vger.kernel.org, Dmitry Osipenko , Mika Westerberg , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 Commit 72daceb9a10a ("net: rfkill: gpio: Add default GPIO driver mappings for ACPI") removed possibility to request GPIO by table index for non-ACPI platforms without changing it users. As result "shutdown" GPIO request will fail if request for "reset" GPIO succeeded or "reset" will be requested instead of "shutdown" if "reset" wasn't defined. Fix it by making gpiod_lookup_table use con_id's instead of indexes. Signed-off-by: Dmitry Osipenko Fixes: 72daceb (net: rfkill: gpio: Add default GPIO driver mappings for ACPI) Cc: # v3.19+ Acked-by: Alexandre Courbot Reviewed-by: Marc Dietrich Tested-by: Marc Dietrich --- v2: s/GPIO_LOOKUP_IDX/GPIO_LOOKUP/, otherwise "shutdown" GPIO won't be requested arch/arm/mach-tegra/board-paz00.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index fbe74c6..49d1110 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -39,8 +39,8 @@ static struct platform_device wifi_rfkill_device = { static struct gpiod_lookup_table wifi_gpio_lookup = { .dev_id = "rfkill_gpio", .table = { - GPIO_LOOKUP_IDX("tegra-gpio", 25, NULL, 0, 0), - GPIO_LOOKUP_IDX("tegra-gpio", 85, NULL, 1, 0), + GPIO_LOOKUP("tegra-gpio", 25, "reset", 0), + GPIO_LOOKUP("tegra-gpio", 85, "shutdown", 0), { }, }, };