From patchwork Mon Jul 11 15:40:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12913934 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA964C43334 for ; Mon, 11 Jul 2022 15:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=3TW6DD674TsIsUcrsi57vQCd5nMHb4PJ2KVR5sGxp2w=; b=KNbQwiybhxCMtC 7Z9Hs56hgXH6VLhkcPHFseD6XpDV38GFIzI9lyM8wP1aJr5taUTrCoHfrfNjPnn4LOyjTqcSPZiMY TG9Cn5wMv/d1SD0f3Imaauc42ko10nnVJJhUksLuhbpSbI5ZjXT41+GMmBj7Hob4kohzQFKivbsgH hrktt7FDwTGuXG7WutSscDwgwI4K1kYL9s0oZtYnVr/vwAa6498Cex8me/tXnOqM5jYLefAyKVGff Kkqrx9zSX5oykvp5KBxYRQEPuqJRrFmdY0S4t1XihZTgHEv32sUHUKwsavUz6smToVM1T5e1jThZX tW1FW/5UUsmXXnTwTGug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAvWc-002vLy-BY; Mon, 11 Jul 2022 15:40:42 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAvWZ-002vIV-C7 for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2022 15:40:40 +0000 Received: by mail-wm1-x32d.google.com with SMTP id p4so3280681wms.0 for ; Mon, 11 Jul 2022 08:40:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5BZPQuxil+Dv7iLgZiJ6GR0BqJ50yPaoAlBNq1INefc=; b=ha2P2Cf45SSEFybH5OyAI/ZPan3MCa/+mVMpnR+ZnyVsjP0ShQEzqP6Rmcofec1+9t 901eNL6X8JJ5hChWdCKGqFHPcTn4756okeztA/1UaENFTghpKwFmskEhdo2iPqdkIStY z5RD9df/246NObqQY4z93q0Xo27WVFDB1xr6t1UnByCFj1StoE3F/JnUeMVhO1mKbRo6 48TwD7gXr7eA+4dFkBMScMw7b/lBlYghpvDk2rEnNs6eO/CxaXqEF0utCs30YdygLZYW cJ1rDOIdw5wiZQMuaDLCxs8wb487pyQXmlD9I5iLF7Oy2lzY+Xp+xSxLeLg+D2j7OV9X D6Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5BZPQuxil+Dv7iLgZiJ6GR0BqJ50yPaoAlBNq1INefc=; b=P+tqO6ltSPceymn/GfMmbLlEb1q01oVKGaYhYmxSZmzu00zcZ/j+N+SFNzEnaIxc8P 2ZCntpIxDkxKJ3enJ86xhI0hkcd0fr4mYKEWjzxWl8Jl/7IG5+lBfLP5YVSn1oQ0NteV WRP1j6vhNTGyZBrclDGzfRN2ycxxaei7P+OLoB6P6a1DHXu14N+GkPoIWZKkbJ0OFWJV HJbdiQQiEV6/TmpxPFAP0tZNbSgL3QGCryv/vwDfP8jxi7SQ7wpSKEserLeE4YF+UFBF S4aumFUOUoMCWbddJrfl1gaoLVPyXhEkT6ZRrwpYFLEQkZ9oP7bLlcGY4FxSNVFcIa3V dOtQ== X-Gm-Message-State: AJIora8SUpX7VlG8RYWdBTYLRdMUI+VLPcF6IEzjU015f+hbqjRILntK g2b9AtxKHDuEccxCETv3mmU= X-Google-Smtp-Source: AGRyM1sFaRV+x7i0ZCpNH4X6Npn5J6bXisr6Xlq2orwc4LzvrdStvLAnE9wHaKfj8L+pVLwTfbDq6w== X-Received: by 2002:a05:600c:4fc8:b0:3a1:99cf:7fe with SMTP id o8-20020a05600c4fc800b003a199cf07femr16358692wmq.142.1657554035321; Mon, 11 Jul 2022 08:40:35 -0700 (PDT) Received: from localhost (p200300e41f12c800f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f12:c800:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id v6-20020a5d5906000000b0021b970a68f9sm6020435wrd.26.2022.07.11.08.40.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 08:40:34 -0700 (PDT) From: Thierry Reding To: Thierry Reding , Jon Hunter Cc: JC Kuo , Marc Zyngier , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] soc/tegra: pmc: Remove leading space Date: Mon, 11 Jul 2022 17:40:29 +0200 Message-Id: <20220711154031.689715-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220711_084039_450971_24E15A6A X-CRM114-Status: GOOD ( 12.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding Remove a leading space from a line that is otherwise indented by tabs. Signed-off-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 6a4b8f7e7948..0e87fdb90a4a 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -2274,7 +2274,7 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq, /* GPIO hierarchies stop at the PMC level */ if (!err && domain->parent) - err = irq_domain_disconnect_hierarchy(domain->parent, + err = irq_domain_disconnect_hierarchy(domain->parent, virq); break; } From patchwork Mon Jul 11 15:40:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12913935 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D55C1C433EF for ; Mon, 11 Jul 2022 15:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tk6loMAJv8GHhY0/zvxHRll9mei9nucXlEHAC9yih8I=; b=TJ54EhwgveXZWE EgqZzItWfG0CVCZ2DqolfwX4ryRo3sotvog22ebx2tlbXRTyrZ9iiMTHWwD3UyWbQ//omH+5EjwY9 IgbtzQxvweImC8rB5/uWCTxZIEi4vxvybP8fB8nx6GpD/5PKGh6bjfqe+USZhgKSEGus6WC71qoHd 6SiLXgcyty28QcKwVR4dgtt6d4hKptYwJK8ypNvZUMsYuIVw/zrdSPbv9Zuusyl0o2sWXv5LwPGQW oaFNV5vIbth+YrlyzUA8LeXPTkbB1Tp2di8Nfvui8XnDDsPaTJIu3r1zj9CVYSddT4BJDHLZd9i68 iLQS0y2YfmbCWEMgQixQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAvWl-002vP5-63; Mon, 11 Jul 2022 15:40:51 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAvWZ-002vJ1-PH for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2022 15:40:41 +0000 Received: by mail-wr1-x430.google.com with SMTP id a5so7526143wrx.12 for ; Mon, 11 Jul 2022 08:40:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bYnBr/wNjLJrIFyLmT5Q7G4SeBDinWfBMSvyzlXXgSQ=; b=eiokIFpp+GOJ5ReQxNwA54jx2zNuEr8L0Fp07BWZP3GPRzFl+mADVnpKKAvW16RfHU unIV/OgTCpRUScck8bBY72mCqa/PRWMXen+NHQuQrhPqpNLEMtkJm5lwhkxEZ/8JaNr2 EsRjTIYXL8PIQjxdiN3GNDUm6dsWNZOTiGsTUIhBFGpCtmPO6X2LzZrIPtsldpB7g06B YkZeCygpo5hdxhjUrnYYoWw2wRtS8xkw5+cT2xX1cwsj8+agYu0NWMQlk+sAqI3azT2w c0ahYC0VoAcUtgx8sUskxV8bNPP0ycSxYz1kArDLPGUL9cHQVebJEDO4pWJE85O/4JXH Jj+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bYnBr/wNjLJrIFyLmT5Q7G4SeBDinWfBMSvyzlXXgSQ=; b=4X1wsxPQwSVN7vApci4+tcKqOolZ7DIHw0WT+p0zWmhh5j60Wo1PexSwl0WhV9hhC8 7eoWao6NJy+zA3HL26xBVP1bWBCUApbb8cAF7AoT7Cmpi0GB9pa860egEmNY4Akn6MrQ 5gB06NwsJKFbsxR+LMYsW8C5gPsCSE6YI0IfO1HNJG/lFZVzKXp4oYXxTEp/l59bHaRm W/q11hDCIM72nTabtKL/O2J0CBzOtiaIrcT1F5VDSgEwt7JWosLM1wLMr2+d0bO/c9b0 H984zA4gWkVf7orXOibdfDYQ/m7ozKx2hhQxIbkh7OMkSiHrfGVhvWDB0wutUoFEgOON 2KTg== X-Gm-Message-State: AJIora8oOBQ13VKylj9rj3SsoNCXDCEH8HohF+qWZT3vdOcKWEjLPRyF IqCrEDhlheQCJ0xWLylIpFQ= X-Google-Smtp-Source: AGRyM1seQ4TfQNSOKZKXsHAuGRJRBTFM1o9VOYZKGqyYG+h23bFo8N8pfa8aquk8RpdK5rTpunaSsw== X-Received: by 2002:a5d:4a0c:0:b0:21d:78c9:c5d3 with SMTP id m12-20020a5d4a0c000000b0021d78c9c5d3mr17490933wrq.42.1657554036880; Mon, 11 Jul 2022 08:40:36 -0700 (PDT) Received: from localhost (p200300e41f12c800f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f12:c800:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id c8-20020a5d4148000000b0021d8b1656dfsm6109291wrq.93.2022.07.11.08.40.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 08:40:36 -0700 (PDT) From: Thierry Reding To: Thierry Reding , Jon Hunter Cc: JC Kuo , Marc Zyngier , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] soc/tegra: pmc: Add support for simple wake events Date: Mon, 11 Jul 2022 17:40:30 +0200 Message-Id: <20220711154031.689715-2-thierry.reding@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711154031.689715-1-thierry.reding@gmail.com> References: <20220711154031.689715-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220711_084039_838670_A0370EFB X-CRM114-Status: GOOD ( 17.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding Simple wake events are neither mapped to GIC interrupts nor have an associated GPIO line. They are close to GPIO-backed wake events in that the IRQ hierarchy processing needs to stop at the PMC level, but since there is no dedicated GPIO line for them, let's turn them into a separate type. Signed-off-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 0e87fdb90a4a..48286bc59f46 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -296,6 +296,17 @@ struct tegra_wake_event { } gpio; }; +#define TEGRA_WAKE_SIMPLE(_name, _id) \ + { \ + .name = _name, \ + .id = _id, \ + .irq = 0, \ + .gpio = { \ + .instance = UINT_MAX, \ + .pin = UINT_MAX, \ + }, \ + } + #define TEGRA_WAKE_IRQ(_name, _id, _irq) \ { \ .name = _name, \ @@ -2239,6 +2250,7 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq, for (i = 0; i < soc->num_wake_events; i++) { const struct tegra_wake_event *event = &soc->wake_events[i]; + /* IRQ and simple wake events */ if (fwspec->param_count == 2) { struct irq_fwspec spec; @@ -2251,6 +2263,12 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq, if (err < 0) break; + /* simple hierarchies stop at the PMC level */ + if (event->irq == 0) { + err = irq_domain_disconnect_hierarchy(domain->parent, virq); + break; + } + spec.fwnode = &pmc->dev->of_node->fwnode; spec.param_count = 3; spec.param[0] = GIC_SPI; @@ -2263,6 +2281,7 @@ static int tegra_pmc_irq_alloc(struct irq_domain *domain, unsigned int virq, break; } + /* GPIO wake events */ if (fwspec->param_count == 3) { if (event->gpio.instance != fwspec->param[0] || event->gpio.pin != fwspec->param[1]) From patchwork Mon Jul 11 15:40:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 12913936 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E843C43334 for ; Mon, 11 Jul 2022 15:41:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VFT3vs9huqJICsIXwbhyNOUem5DhHhYTtcdkwxZ1jqo=; b=0u+4s/923ixgGz tFWUUbgAgbba3c1E42OuMPw//+k9eBJujN7JYCcEWXoQmPeOGYNNBxFIlDSXJtKCHxMk/bfAi4NlV 9TJH+F2EzJInrrnBQgK2rYnsJjlsXumzyjdIKMmXbaVxN3sqqQ2pnIX0jOTVZkfUX+G6jQHa3LBAJ aH3OTlunn2C0PsLzvj4PcU7U1lSmDCwtXN98/pkki0c6obFgX94DxGsfpNVkYkNuRqdoJfb3o+H6B SXOeiLjpm7G7BkaD3VfXRiDSOtqfRs7B6IDECxlxBV8KICI2L5yi0JbIQ/DL+VFSDvBIeLYwOVLlZ gwzGOW/drUSf1FDzWF1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAvWu-002vUH-E6; Mon, 11 Jul 2022 15:41:00 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAvWc-002vJT-EZ for linux-arm-kernel@lists.infradead.org; Mon, 11 Jul 2022 15:40:43 +0000 Received: by mail-wr1-x434.google.com with SMTP id v14so7542901wra.5 for ; Mon, 11 Jul 2022 08:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ez9+tjVgr9xPqmbVh6v+qKgZ5GQQjYM0LVlLWfjutJs=; b=JD5XMAOHWrsVkWSLdsWZUqKoqjXpza6DqI0JMspe9IxEC9XBRtg19sHw0aTM3YR2z/ e7MXm4BMfigtA+jY6mhOQF2wYOXn2eoULMJ5lonySUhrGPrMNW7BQvkctIdaOqc6VLr+ CpK++yYbEXM3SQX7dgnsXVAKhIWow/foWvvJtPp/x5aV9XnM5dQVM1ZVsuNPt+1Vbl1q RpJIRVqXpljY+JXkkV1ghLfisqn9Y7roruQ5o19SrsGXQqSNQzAc33HfvjObxypRleeB ht1jgJE4PptPBpWX36ZFIMRB5MdANl6Usz7Rjp8qvpEhH/ZFFPbq/pRxDfP4vcwkF0j1 N0Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ez9+tjVgr9xPqmbVh6v+qKgZ5GQQjYM0LVlLWfjutJs=; b=xLPUcXoQroXDzAS4hf2Eirfn8bviJyyq6dEOiaM4oeL5C5bf34UugqT8YxX/ieY5Qh NDk9O9HC/SWooTzjKAilTTUWMJjKL47JajJz8ZTip430efCwYiXnSemH2RfYsLI2I2GQ DXl7gd6fh8Qtlf8yK/fWnuReMUjPV11c3XMEAP4OlbsqExV6h5zxVgc1zGHhm1roGkEH wI1GnmYuTP6Unx2+KAJ61aY+8AoWhJVu8WDX3bVRIzPwPSFxFILTPXlsWax8xqDlmO/Z 8bLPxzLo7EznKq3TPzAyZPeQZ6OgtzvOtLIJSJS0zNHEDdJsDyYTlZJqNW1z4fhlVFQZ csOg== X-Gm-Message-State: AJIora+eBp2CohH5v/tIwWrNv1e+sSOBh0KaGdzXDxIUwrDVDYC/dfac 5Mb1+EygMi3G6sENeZIkrLvXq85iB/E= X-Google-Smtp-Source: AGRyM1v2Lwn8k/6H6KzX8TdTfHsnUve19NS2WHE5hrP9R/YpJXpoaZsbnOR/RIYJKxLOP5/Qj95F+A== X-Received: by 2002:a05:6000:2a4:b0:21d:8646:37f6 with SMTP id l4-20020a05600002a400b0021d864637f6mr16832102wry.661.1657554038723; Mon, 11 Jul 2022 08:40:38 -0700 (PDT) Received: from localhost (p200300e41f12c800f22f74fffe1f3a53.dip0.t-ipconnect.de. [2003:e4:1f12:c800:f22f:74ff:fe1f:3a53]) by smtp.gmail.com with ESMTPSA id j9-20020a05600c410900b003a02cbf862esm6955667wmi.13.2022.07.11.08.40.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Jul 2022 08:40:37 -0700 (PDT) From: Thierry Reding To: Thierry Reding , Jon Hunter Cc: JC Kuo , Marc Zyngier , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/3] soc/tegra: pmc: Add USB port wake events for Tegra194 Date: Mon, 11 Jul 2022 17:40:31 +0200 Message-Id: <20220711154031.689715-3-thierry.reding@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220711154031.689715-1-thierry.reding@gmail.com> References: <20220711154031.689715-1-thierry.reding@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220711_084042_516806_82DD8EE9 X-CRM114-Status: GOOD ( 10.84 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Thierry Reding Tegra194 supports waking up from suspend when activity is detected on any of the USB ports. Add these wake events so that the system can be woken on such activity. Signed-off-by: Thierry Reding --- drivers/soc/tegra/pmc.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c index 48286bc59f46..03d614acd521 100644 --- a/drivers/soc/tegra/pmc.c +++ b/drivers/soc/tegra/pmc.c @@ -3776,6 +3776,13 @@ static const struct tegra_wake_event tegra194_wake_events[] = { TEGRA_WAKE_IRQ("pmu", 24, 209), TEGRA_WAKE_GPIO("power", 29, 1, TEGRA194_AON_GPIO(EE, 4)), TEGRA_WAKE_IRQ("rtc", 73, 10), + TEGRA_WAKE_SIMPLE("usb3-port-0", 76), + TEGRA_WAKE_SIMPLE("usb3-port-1", 77), + TEGRA_WAKE_SIMPLE("usb3-port-2-3", 78), + TEGRA_WAKE_SIMPLE("usb2-port-0", 79), + TEGRA_WAKE_SIMPLE("usb2-port-1", 80), + TEGRA_WAKE_SIMPLE("usb2-port-2", 81), + TEGRA_WAKE_SIMPLE("usb2-port-3", 82), }; static const struct tegra_pmc_soc tegra194_pmc_soc = {