From patchwork Tue Oct 8 09:34:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13826113 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 081B817C9E9; Tue, 8 Oct 2024 09:34:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728380101; cv=none; b=RQgGHjD6qeTcqljMyMyp/byD9ucRSaa3Q7YgsxYGFrJP2b6IFDD9YAW1NDl+89XPXJLg18j9g2UCzWycAXkfrzjeevbo0EiyCBgBR5SFo2LYcM4WgJRcPhXGssV2FJyUjaLHwktKrtl9g2nICOjSJk2iTn5nf507kbtvbtX0Vg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728380101; c=relaxed/simple; bh=xiQyNd8nwgbLMKCGJtOhLvhbzts3Zyiesad1YOA67B4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Lt/HxPCS/W/sxFet/J3lerK8IyqaZ46Z8k9K8pd8aeRNkAE5ro6KKzXOSzidiZuzBfKy/aLfL+zeM1uaGDd7X1MxhMP0GGuaPsubGVeWlc1tShl8sFxjd44E6stgF8CtpSfIANSKxRvhOVHtDX/0hgGFCKPQWYYrQk7yDRAMXek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=VvJwCWOS; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="VvJwCWOS" Received: by mail.gandi.net (Postfix) with ESMTPSA id 76E9AFF805; Tue, 8 Oct 2024 09:34:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728380097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k6pUgjetX71AkeSNcjihdWO8cWqAN+2fklEFHWBBZho=; b=VvJwCWOS3HqYCL/UdfU0NyI05aguQMiqPO9D7kyZlyr2h6hDa40yHt1I0XYdtySg59s8J5 uhqzv9KfRlXb9EEA39Qd2tnXJTxHtKDssyBYSqKGUp6cv5TR697+BQImUoCm88t9aYWN8h 9rOtFT2UyucyqajoGnh763HOIv1IKPo0QIQUvCjlw+MKMpKMBI4UVgEEJrYT/U9Q4pixVy U7X9wv50VXpzez8EhArLYf0go/uu5KWZTF4WglVrzRVWHyYhr8NcV6zBzBaJcCiGtnfsUv 4+ZUzDKUqZz2G5KEkidAPGrwb5GlGzihm9PmTjbBY+cuguTrDvi12KB2cpbOtA== From: Thomas Richard Date: Tue, 08 Oct 2024 11:34:16 +0200 Subject: [PATCH 1/2] pmdomain: ti-sci: set the GENPD_FLAG_ACTIVE_WAKEUP flag for all PM domains Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241008-8250-omap-no-console-suspend-v1-1-e7f0365c02f0@bootlin.com> References: <20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com> In-Reply-To: <20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Ulf Hansson , Greg Kroah-Hartman , Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, u-kumar1@ti.com, tony@atomide.com, khilman@kernel.org, gregory.clement@bootlin.com, thomas.petazzoni@bootlin.com, theo.lebrun@bootlin.com, richard.genoud@bootlin.com, Thomas Richard X-Mailer: b4 0.14.1 X-GND-Sasl: thomas.richard@bootlin.com With this flag, if a device is marked on the wakeup path, the corresponding PM domain is kept powered on. Suggested-by: Théo Lebrun Signed-off-by: Thomas Richard --- drivers/pmdomain/ti/ti_sci_pm_domains.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c index 1510d5ddae3d..38448b4a035a 100644 --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c @@ -186,6 +186,7 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev) pd->pd.power_off = ti_sci_pd_power_off; pd->pd.power_on = ti_sci_pd_power_on; + pd->pd.flags |= GENPD_FLAG_ACTIVE_WAKEUP; pd->idx = args.args[0]; pd->parent = pd_provider; From patchwork Tue Oct 8 09:34:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13826114 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84F98158205; Tue, 8 Oct 2024 09:34:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728380101; cv=none; b=CfmVjboZ0ZcRMETjaZonAeSBDAszrat/Z7hS62iNktXdC6vfqcA+/Q4lpj70VR8lDpD6YVLV3pGEC8ycncQTY31oeUrSUDouNpOkX1yPwgzc8LZyFRSFNXUwWDsfgrOS4sTzY16nhSZbSVmavkPopc3nKlfGf+Gzr5kMGq+kRVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728380101; c=relaxed/simple; bh=7g9SsjPLBNKzQvsNRBWduVdMiJPt5aqN0I2fNE1zBqM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DBhKfax5WeS8dgCQ4lE2NxvZ88frir5R/iIPXpY4F//ZCN5BsOUpgnAbwQn5sXLKY64rPpMj20F2nQn7DocyIicHGjlnVxWMcJ37lzmCO5Rl+OCJCypVE4u9qNcP1dymXiGLLGqCjEbCjnuaEJwjXFDWAaJYqkaG5JDRoxAcqek= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=PcoZnEZ7; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PcoZnEZ7" Received: by mail.gandi.net (Postfix) with ESMTPSA id 50B8CFF80A; Tue, 8 Oct 2024 09:34:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1728380097; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RVTfe75X+UxRm0WZMZZTw+6JUiWJGgpFVKMMyLGuwIE=; b=PcoZnEZ7CEFWJPDMgrhG0gzXmD9FHG3JPN8jZ/HdxwKs7zi3sbOhWMd6oUZYSZpz0FQr0q 8YJhgNwYo79P/gveCTJUsLsdK6GK17BvyD3bLKWE5gDv6i3g3KsPhS94NiiJzzP+eKgxdA kkXNCJV9/3q8eVkcv5udNX2Nsd4NrNH6EGi5UvueFMiBpK4UsuBPlovELlYwkRaTs8T1rV SqYK0BaNUEASGM+BGcbp34MdKGUVnMGFda1PuY0C2gkzXgDZl5oehdS0b/AEmVs7mCe0EV ItPgaac7jB8kz6fxPR9L7zBTcH8S7iS52A/njS2VGNVh+wfYV8BLKLdPel4JYQ== From: Thomas Richard Date: Tue, 08 Oct 2024 11:34:17 +0200 Subject: [PATCH 2/2] serial: 8250_omap: mark the serial as on the wakeup path if no_console_suspend Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241008-8250-omap-no-console-suspend-v1-2-e7f0365c02f0@bootlin.com> References: <20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com> In-Reply-To: <20241008-8250-omap-no-console-suspend-v1-0-e7f0365c02f0@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Ulf Hansson , Greg Kroah-Hartman , Jiri Slaby Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, u-kumar1@ti.com, tony@atomide.com, khilman@kernel.org, gregory.clement@bootlin.com, thomas.petazzoni@bootlin.com, theo.lebrun@bootlin.com, richard.genoud@bootlin.com, Thomas Richard X-Mailer: b4 0.14.1 X-GND-Sasl: thomas.richard@bootlin.com If the console suspend is disabled, mark the serial as on the wakeup path to keep its PM domain powered on. Suggested-by: Théo Lebrun Signed-off-by: Thomas Richard --- drivers/tty/serial/8250/8250_omap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 88b58f44e4e9..6764fe2f9cad 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c @@ -1660,8 +1660,12 @@ static int omap8250_suspend(struct device *dev) if (!device_may_wakeup(dev)) priv->wer = 0; serial_out(up, UART_OMAP_WER, priv->wer); - if (uart_console(&up->port) && console_suspend_enabled) - err = pm_runtime_force_suspend(dev); + if (uart_console(&up->port)) { + if (console_suspend_enabled) + err = pm_runtime_force_suspend(dev); + else + device_set_wakeup_path(dev); + } flush_work(&priv->qos_work); return err;