Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp475985imm; Fri, 21 Sep 2018 03:28:53 -0700 (PDT) X-Google-Smtp-Source: ANB0Vdbn4D2u9vGSaewmSeIsL4xNGW4owU8QhaW/lqU27s32d5P3aFEF8HCN1oQfYzQ31an11qXp X-Received: by 2002:a63:fe49:: with SMTP id x9-v6mr10867568pgj.152.1537525733297; Fri, 21 Sep 2018 03:28:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537525733; cv=none; d=google.com; s=arc-20160816; b=oCabvo0J0IXL3fbe9s/2J4JSIDxIEriWH5ML+6SzLrEr1m3V8S1Z0vHVwmSl821YYB lmFIyAZddko4Dwn2BZBKkSJEyumsVzSyQKTIztbYteR/UHxEk+ExIXhpC/Gas1UFynjR HXHZHxbF1rvvStS65Kso2P4mfmEFl/uIIDiEuXmqMa5kc0HDxMR6B2Tr78geiDwWgpjw zxB7x01kKBVLCoAzoFKuyw6GJaXji7OyrDo7aFwNKcEfSlUBqlGzK0rKHZiRBNAx4Zl2 xFUUyCiCaCU9NvNp6KBUoNcewzPpDOdq8er6sEgu2CPI0z/DUZrRyzwh263JW5a00qRk cNtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GbGBYnIeoST/0zQWTWLQzJlAfoD9M3FE2inu0eq3szg=; b=fT2CpCtoFA8uf9kjsOfr3mdXQFAbbPsO8eDyPzoXRYoaDynHnkY4GhtTxb1RWU20cy Ibg430UZFDlppYK1nzqdjK7/4sUmTTvJrFpCKuXd2uW4VyRdnJNYy5mc5O9I5wZ+z+3A S2eirMHsPipwMuQDabLQE/iwoCPkqfbi/BT2JwhZ+QCshJstlA8/2GF6VifFPHYSRRLi kHceKTH98Jhb0XDQOd7O1EeScZsUHj/Lx7h52bTZGwHu91zWlWLWpZZ1kNxXJ92VtP3X kdyKdPoAvqVQ7d/eYq2BLncjHwvmjnPEDb8kE6dDM9+XUkPaBv2V+HSYD6EMpDA1MzkG v4gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=bPtt6AzT; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si26321802pgd.400.2018.09.21.03.28.37; Fri, 21 Sep 2018 03:28:53 -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=@gmail.com header.s=20161025 header.b=bPtt6AzT; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390391AbeIUQOK (ORCPT + 99 others); Fri, 21 Sep 2018 12:14:10 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:32841 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390365AbeIUQOJ (ORCPT ); Fri, 21 Sep 2018 12:14:09 -0400 Received: by mail-wr1-f67.google.com with SMTP id n11-v6so1103818wro.0; Fri, 21 Sep 2018 03:25:55 -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=GbGBYnIeoST/0zQWTWLQzJlAfoD9M3FE2inu0eq3szg=; b=bPtt6AzThbkO/B3qvA/OaTVMF7mLY1P5wsGqKTMcYhLVMn3t+YfNfGPmTthvHZ+rbG RL8xkEUVVefHRvmhwY+nI860PJ5rwzk15Nd35f/jBUSF2ZlQVVLw1O8+r3iQZMKFM9Xs fHGSZicy71ynKWAip/xXAHYRYmqC04qa5zvmzIb6/RCWEFc08H90HxmUAG606kHzxm6N PITDwpKKDsHRrzSrr8Y8qElNNq5qYZwdLnyZyLTqmYvmma5acTzkTlt8TpV7ASrTz2+I UuJLrhlgWzyXQKs/BIowtkuS2J8X7B+SgCNSx4/fzPfnAfTSnJ7gDkpSXvTVAVJYaOO2 jTDA== 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=GbGBYnIeoST/0zQWTWLQzJlAfoD9M3FE2inu0eq3szg=; b=JFJhjCq+mO4CO+KSI+w+R0GhNiMcbO83+dF9fT2tbxBmIe9Xrht2nv69WPD67ZBRdD le28075X43DzEyV+X8QdCkXVUVQ7KaR67G5XLn75tzalRryRLhoiZemVuVcaTZvT+bKm aiKmJSBzkx8cDjohWQLtiontYDLwA2KCmPwkMph0G65AlhN+WxMtr0Nypvh6jMggZChS t8OsMxBuUgFFtzE/LjpB0WTI0TNFO6OclKTcO8ujJ/uW+daMZsqe0lqTCjavN3Hsg4o5 1vvw1TcUoCfzr4yIPPmSNsycpZY1m2IGRmDZAzfKWfldbN6dSidNRT7SKIfABAi32nVB 3BIw== X-Gm-Message-State: APzg51CqeT37J0FQ6D853PlH5ikpFEh+oxcmIE1nBce1TuM4dJI62HFJ duZHWwmxbMx0Vax1SCc0PJQ= X-Received: by 2002:a5d:610b:: with SMTP id v11-v6mr12643586wrt.265.1537525554820; Fri, 21 Sep 2018 03:25:54 -0700 (PDT) Received: from localhost (pD9E515A3.dip0.t-ipconnect.de. [217.229.21.163]) by smtp.gmail.com with ESMTPSA id h17-v6sm23242580wrq.73.2018.09.21.03.25.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Sep 2018 03:25:54 -0700 (PDT) From: Thierry Reding To: Linus Walleij , Thierry Reding Cc: Thomas Gleixner , devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/9] soc/tegra: pmc: Add initial Tegra186 wake events Date: Fri, 21 Sep 2018 12:25:41 +0200 Message-Id: <20180921102546.12745-5-thierry.reding@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180921102546.12745-1-thierry.reding@gmail.com> References: <20180921102546.12745-1-thierry.reding@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thierry Reding Tegra186 support 96 wake events in total. Many of them are never used, so only the most common ones (RTC alarm and power key) are currently defined. Signed-off-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index eeef5a1f2837..42e7deb6de74 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -53,6 +53,7 @@ #include #include +#include #define PMC_CNTRL 0x0 #define PMC_CNTRL_INTR_POLARITY BIT(17) /* inverts INTR polarity */ @@ -2351,6 +2352,11 @@ static void tegra186_pmc_setup_irq_polarity(struct tegra_pmc *pmc, iounmap(wake); } +static const struct tegra_wake_event tegra186_wake_events[] = { + TEGRA_WAKE_GPIO("power", 29, 1, TEGRA_AON_GPIO(FF, 0)), + TEGRA_WAKE_IRQ("rtc", 73, 10), +}; + static const struct tegra_pmc_soc tegra186_pmc_soc = { .num_powergates = 0, .powergates = NULL, @@ -2366,6 +2372,8 @@ static const struct tegra_pmc_soc tegra186_pmc_soc = { .regs = &tegra186_pmc_regs, .init = NULL, .setup_irq_polarity = tegra186_pmc_setup_irq_polarity, + .num_wake_events = ARRAY_SIZE(tegra186_wake_events), + .wake_events = tegra186_wake_events, }; static const struct tegra_io_pad_soc tegra194_io_pads[] = { -- 2.19.0