From patchwork Mon Sep 10 19:50:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janusz Krzysztofik X-Patchwork-Id: 10594731 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 59EF714E5 for ; Mon, 10 Sep 2018 19:49:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48520292EA for ; Mon, 10 Sep 2018 19:49:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C2A7292F8; Mon, 10 Sep 2018 19:49:04 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC47D292EA for ; Mon, 10 Sep 2018 19:49:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728907AbeIKAom (ORCPT ); Mon, 10 Sep 2018 20:44:42 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:35183 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728896AbeIKAol (ORCPT ); Mon, 10 Sep 2018 20:44:41 -0400 Received: by mail-lf1-f68.google.com with SMTP id q13-v6so18470230lfc.2; Mon, 10 Sep 2018 12:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=xgYuvQY4yWBtm2f06S/yg/wR5OiT+6uG/z3l5BwPSgs=; b=kvcVRxHc0q7ew0GiemJwa4rHm7Rufnyursm5uL/H4JKgS9Cqs62a32S2bpcf5Y/F+w QtV5wo3adm6mepF1vSiqmsX4kqvRBuCfqTwJLRV/QLXKJkgZI3H2XWh7MxJIVTNfiMG2 zWRjXxE9JMUcxlRyrqV4eWyFmPJkeTfbZpYDoObntWA9MVgsZCDHjOMPItDiHWbzhoKI xaWQl1MLR0501ylQQkj/sVyMAPpqUcRtDihsXebZzG47e2v7iavFvqE2J7KEdTEpGqQL MyfvW1cVtSW3pQ4QXsNln79hDdELoc3gOyqqEQXh2fPSmlID+hZ4qZFADKdKzQ3js5O5 prGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xgYuvQY4yWBtm2f06S/yg/wR5OiT+6uG/z3l5BwPSgs=; b=GaPz2TRDzc/DSx71D3giykinUwfLV9W4jlOvmFty7KegW72rjc71zqs4UPm8rNQToW cyVJsvoyE6DymaNQQ3VwEb6cF6thqzh6T15OnXig5Lr732TJnMZWHDbl9cmbgkmhKQU/ /KJ7u6n39Za5g3ty68pHMf6/PeSFmbIVFMIHdGNEvWTf1VJGQrqclUpyG0eBz3j4g/z4 pS4yg45vtu/tNSpJ+NB6bPo/Epib+qvp+vzzaSbLRPSUmYmQPDPTl/Zp+NsAiQGpzGxR SbSdtJ5oEY23GnkgWQ81mqAO2fRHaynQ1Q+MIpMvGUum4skXoHaNZFt6lr9hTZJ7+4Cc OTmw== X-Gm-Message-State: APzg51AZV0JaGftMDdK8NMKth8/+AFz9rvxnHwt4LfoQr8+7yZix/9ST zJvWxeFh8DBRKIehzHA3WlY= X-Google-Smtp-Source: ANB0VdZkdYMpAi24AE+zfrsCIFCILeJHedQVkWFuLJtVPC4drrleNP2vpuV4aQrvjsgBlYzNAb3Eog== X-Received: by 2002:a19:129e:: with SMTP id 30-v6mr13209565lfs.29.1536608940620; Mon, 10 Sep 2018 12:49:00 -0700 (PDT) Received: from z50.lan (93-181-165-181.internetia.net.pl. [93.181.165.181]) by smtp.gmail.com with ESMTPSA id f7-v6sm2871492lfc.4.2018.09.10.12.48.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Sep 2018 12:48:59 -0700 (PDT) From: Janusz Krzysztofik To: Tony Lindgren Cc: Aaro Koskinen , Janusz Krzysztofik , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: OMAP1: ams-delta: Don't request unused GPIOs Date: Mon, 10 Sep 2018 21:50:08 +0200 Message-Id: <20180910195008.24127-1-jmkrzyszt@gmail.com> X-Mailer: git-send-email 2.16.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP GPIOs with no kernel drivers can still be used from user space, don't request them from the board file. Signed-off-by: Janusz Krzysztofik --- arch/arm/mach-omap1/board-ams-delta.c | 40 +---------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c index dd625ac3cd09..fee528dccc3e 100644 --- a/arch/arm/mach-omap1/board-ams-delta.c +++ b/arch/arm/mach-omap1/board-ams-delta.c @@ -250,39 +250,6 @@ static struct platform_device latch2_gpio_device = { #define LATCH2_PIN_HOOKFLASH1 14 #define LATCH2_PIN_HOOKFLASH2 15 -static const struct gpio latch_gpios[] __initconst = { - { - .gpio = LATCH1_GPIO_BASE + 6, - .flags = GPIOF_OUT_INIT_LOW, - .label = "dockit1", - }, - { - .gpio = LATCH1_GPIO_BASE + 7, - .flags = GPIOF_OUT_INIT_LOW, - .label = "dockit2", - }, - { - .gpio = AMS_DELTA_GPIO_PIN_SCARD_RSTIN, - .flags = GPIOF_OUT_INIT_LOW, - .label = "scard_rstin", - }, - { - .gpio = AMS_DELTA_GPIO_PIN_SCARD_CMDVCC, - .flags = GPIOF_OUT_INIT_LOW, - .label = "scard_cmdvcc", - }, - { - .gpio = AMS_DELTA_LATCH2_GPIO_BASE + 14, - .flags = GPIOF_OUT_INIT_LOW, - .label = "hookflash1", - }, - { - .gpio = AMS_DELTA_LATCH2_GPIO_BASE + 15, - .flags = GPIOF_OUT_INIT_LOW, - .label = "hookflash2", - }, -}; - static struct regulator_consumer_supply modem_nreset_consumers[] = { REGULATOR_SUPPLY("RESET#", "serial8250.1"), REGULATOR_SUPPLY("POR", "cx20442-codec"), @@ -860,7 +827,6 @@ static void __init ams_delta_led_init(struct gpio_chip *chip) static int __init ams_delta_gpio_init(void) { struct gpio_chip *chip; - int err; if (!machine_is_ams_delta()) return -ENODEV; @@ -871,11 +837,7 @@ static int __init ams_delta_gpio_init(void) else ams_delta_led_init(chip); - err = gpio_request_array(latch_gpios, ARRAY_SIZE(latch_gpios)); - if (err) - pr_err("Couldn't take over latch1/latch2 GPIO pins\n"); - - return err; + return 0; } device_initcall_sync(ams_delta_gpio_init);