From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ED35EC4CC9E for ; Wed, 11 Mar 2020 18:58:23 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C2033206BE for ; Wed, 11 Mar 2020 18:58:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tzwnb1Dg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2033206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=driverdev-devel-bounces@linuxdriverproject.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6E4DA8698B; Wed, 11 Mar 2020 18:58:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u_t6qTll1RWk; Wed, 11 Mar 2020 18:58:21 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 957FA86427; Wed, 11 Mar 2020 18:58:21 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 3298D1BF400 for ; Wed, 11 Mar 2020 18:58:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2FF01862AC for ; Wed, 11 Mar 2020 18:58:20 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PK9tRBDM01iy for ; Wed, 11 Mar 2020 18:58:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 8DD0486268 for ; Wed, 11 Mar 2020 18:58:19 +0000 (UTC) Received: by mail-wm1-f68.google.com with SMTP id a141so3339745wme.2 for ; Wed, 11 Mar 2020 11:58:19 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=8wh4nE9bCVn8Cqz0dv66qLtY8AelRLg/mHHNq+40Mfg=; b=tzwnb1DgJgtJCVZKSZrnp2uqM8Tjpralbu2jF5CEtvSVrV6uJvqtB25s8Ud422iC6V 5EtBuKOhgSbJIVBnf0ZtDYh6IL6uz7qZgcp0EUKfu9wj0ybf7rK+xLWQo/0exbZ6nl5j HsZRK7fou7gj2mCocmEPnxj9vUoioTEHTVUKuX2dFYIcvBP+H21GHjx1pOFVEF+iIs7+ +msHr3OfOFK7Ft4nKTeKB0mg/4l+YGExt0zJOEt5NZswX20NA5D8a4UmTOMGYGNMnIRb ckQbX9k5jX9VHdgzIgiYZozdrlTRKCwIN7+83OQUpONW63D9vA0vvqf7xUiAHyuWP0h5 uZDg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=8wh4nE9bCVn8Cqz0dv66qLtY8AelRLg/mHHNq+40Mfg=; b=pgSquVVl2UUgBOf3VHJeUc2ueMRmrxTQBW0TQ7hmwn0XJ2CyGYdyGSoj/SxKvy+MAS r5xXsoTA2NKP5VwtVzaU7euiX+bjsbji+K+qNutk2bLN4nralXZPHN0z240QtOK2DcU9 VFIefPND50Sp9BqbwlxpiWFSDxcmgal7bZKD/ZfR2Ur55K9pjcO18h3spDmVlWWWslzX b3NMq4b+IWJBwtg5wd396iYoniOqFPSNF6CJR/o4PN0OWK+DrPlVNcJ16CCio2DxH0RS C0oVFzKlmJPcR6qmL/lDeXgACzyG3Fd1pIqeXs/h2fXl7PMxwg20LWhx/BwHPYDnjqAg ONRQ== X-Gm-Message-State: ANhLgQ0VvadGMByQlOs13o/bTk0YG9AA27af3yEgy+SP8vJiugVZRcPP pqD0AsDvuMFz3sQr6v2s8OMbmgSm X-Google-Smtp-Source: ADFU+vuxb9XEQkqUWk5+WckgRxeBPegGUGwQwawbss8AQZ4dVnYiXJ29jaEAFexWfqgAYoc9zsux7g== X-Received: by 2002:a1c:bcd4:: with SMTP id m203mr150176wmf.35.1583953098001; Wed, 11 Mar 2020 11:58:18 -0700 (PDT) Received: from localhost.localdomain (134.red-83-46-193.dynamicip.rima-tde.net. [83.46.193.134]) by smtp.gmail.com with ESMTPSA id n11sm38457120wrw.11.2020.03.11.11.58.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Mar 2020 11:58:17 -0700 (PDT) From: Sergio Paracuellos To: gregkh@linuxfoundation.org Subject: [PATCH v2 5/5] staging: mt7621-pci: release gpios after pci initialization Date: Wed, 11 Mar 2020 19:58:08 +0100 Message-Id: <20200311185808.29166-6-sergio.paracuellos@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200311185808.29166-1-sergio.paracuellos@gmail.com> References: <20200311185808.29166-1-sergio.paracuellos@gmail.com> MIME-Version: 1.0 X-BeenThere: driverdev-devel@linuxdriverproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Driver Project Developer List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ryder.lee@mediatek.com, driverdev-devel@linuxdriverproject.org, weijie.gao@mediatek.com, gerg@kernel.org, neil@brown.name Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" R3G's LEDs fail to initialize because one of them uses GPIO8 Hence, release the GPIO resources after PCIe initialization. Signed-off-by: Sergio Paracuellos --- drivers/staging/mt7621-pci/pci-mt7621.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 0880a21f2620..8399e4629e38 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -482,6 +482,14 @@ static void mt7621_pcie_reset_ep_deassert(struct mt7621_pcie *pcie) mdelay(PERST_DELAY_US); } +static void mt7621_pcie_release_gpios(struct mt7621_pcie *pcie) +{ + struct mt7621_pcie_port *port; + + list_for_each_entry(port, &pcie->ports, list) + gpiod_put(port->gpio_rst); +} + static void mt7621_pcie_init_ports(struct mt7621_pcie *pcie) { struct device *dev = pcie->dev; @@ -706,6 +714,8 @@ static int mt7621_pci_probe(struct platform_device *pdev) return err; } + mt7621_pcie_release_gpios(pcie); + return 0; } -- 2.25.1 _______________________________________________ devel mailing list devel@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel