Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1918300ybd; Sun, 23 Jun 2019 20:04:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8QauhkAskEiv8X4FvSUnGVkK9qYHOogkVNRH5kQJBjAOVtAHcZwQMQNnQ0bnI1v1ZiIhL X-Received: by 2002:a63:730c:: with SMTP id o12mr6739271pgc.18.1561345463641; Sun, 23 Jun 2019 20:04:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561345463; cv=none; d=google.com; s=arc-20160816; b=lvpS7pc3kMpAgYBplD3vw8/VUoAFoAJndwvyLxUr1t8UvIZp8aM4488bmiu/Dw1tTa nzmHlkWqFMIVnf6/RFO5GNne7p8BaMKLhqBdShmDzWatM4Py2tEnw6g+pUa3B/UlHuiR 1VMQ/Hy09ubSsvaKme3mRXN6YfHYZBRh4nZ99LHhVyh2LCB7D8uBr1/I1fZIHg3IWGGR AbJE1wIknMiY14Clf9WDdwpLOaS517v01TJHkx4B6aMhehRyfwDd+HyqLVdANWNbh0hF qmtRSn1OkIU3vjyFA9bS6mgXKHiQT5BneYj/29735TrxxR/W9lZtScof3NL0mD1xQRKG rxsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=sRe8u/ipKpVvaQoBwoDn3g0xn32P0M0SuS3aAzlESxI=; b=ED7afKJIQqXVKgfV8EqmGvvUPSuOnDuCYvAj9fUYgbyMOMt5MBvjpveSKV1+8jmH3g xcbv7PspppWqIOlJmR/Vb6CD6vIFlRd+sOt37O+VE1icAB4TfwaAbpIu/cyIYUc9Rd2K vly79ARfPa7s1+3CYRrdIskCA92Nd5CophQeHIDs5EAlodOgapqyVS9jeH3FW+kSD82z fsjlEu5iA5Fqf9bZZnqG3HuIIUTfFALtbvbwH+BHrOriPR2AhZ4AtsK/jTuwOFq5Nc7g mLzG9SV0OijiSLPvyOBrXFYuh9CtDkIdqQeAVxh54aF1+H9+ZXlurZGPzIuZfC7BVQU/ fM4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=MCDvEj2h; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h21si8722671pgv.102.2019.06.23.20.04.08; Sun, 23 Jun 2019 20:04:23 -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; dkim=pass header.i=@nvidia.com header.s=n1 header.b=MCDvEj2h; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727398AbfFXDDQ (ORCPT + 99 others); Sun, 23 Jun 2019 23:03:16 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:13181 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726917AbfFXDDN (ORCPT ); Sun, 23 Jun 2019 23:03:13 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Sun, 23 Jun 2019 20:03:11 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Sun, 23 Jun 2019 20:03:12 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Sun, 23 Jun 2019 20:03:12 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 24 Jun 2019 03:03:11 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 24 Jun 2019 03:03:12 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.174.126]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Sun, 23 Jun 2019 20:03:12 -0700 From: Sowjanya Komatineni To: , , , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH V4 03/18] gpio: tegra: use resume_noirq for tegra gpio resume Date: Sun, 23 Jun 2019 20:02:44 -0700 Message-ID: <1561345379-2429-4-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1561345379-2429-1-git-send-email-skomatineni@nvidia.com> References: <1561345379-2429-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1561345391; bh=sRe8u/ipKpVvaQoBwoDn3g0xn32P0M0SuS3aAzlESxI=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=MCDvEj2hfTBiQwprqPOCEEpybnoW7OecF4panZAyYbSramhqrAS2e8kHgAIBCj1tl njduCX2jTV1tc5vmJMbjiL9af/ZHS1V6cIz2XIC49nt6c8RtDnL2XP+RE4W9mS18yq bU23/GPUf2/nSKdYHjKQBQTiw1AcQWRaNHugFy7qBtroGtLrNxeh1FzMkqbXaZTgnP G45oTnaobBikSHIHe3LhdfvoFibQLxjpoMN1XPrXxkBJjswMBjWkzkZKiN9wOumekI LjEIyVOLDZwZEE0NsdQOMbySCnlW51+DkjFgXNqt/K/lUNJzsN+UlNHkYacXX6zm6S vvBC6wn/y6kiw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org During SC7 resume, PARKED bit clear from the pinmux registers may cause a glitch on the GPIO lines. So, Tegra GPIOs restore should happen prior to restoring Tegra pinmux to keep the GPIO lines in a known good state prior to clearing PARKED bit. This patch has fix for this by moving Tegra GPIOs restore to happen very early than pinctrl resume. Signed-off-by: Sowjanya Komatineni --- drivers/gpio/gpio-tegra.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index f57bfc07ae22..f427540568f9 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -410,7 +410,7 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc) } #ifdef CONFIG_PM_SLEEP -static int tegra_gpio_resume(struct device *dev) +static int tegra_gpio_resume_noirq(struct device *dev) { struct tegra_gpio_info *tgi = dev_get_drvdata(dev); unsigned long flags; @@ -554,7 +554,8 @@ static inline void tegra_gpio_debuginit(struct tegra_gpio_info *tgi) #endif static const struct dev_pm_ops tegra_gpio_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume) + .suspend = tegra_gpio_suspend, + .resume_noirq = tegra_gpio_resume_noirq }; static int tegra_gpio_probe(struct platform_device *pdev) -- 2.7.4