Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp937766lqd; Thu, 25 Apr 2024 00:49:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXAZgMFfNsY/o9I6R0qw1qQCbK7MQ6Qor65PLB5lTCHBWi/7LvEPFgmm6kfn9+voSJ8GMp0e7Pu7sVkAoD7NTNMPvUBMmlcQjm7BHfEuA== X-Google-Smtp-Source: AGHT+IFGlYYIBAwLpbMJ8ocFM4H+1j99HCYO66E1dr153ZO/A/+72PFNsjbB5DHZOKtLDbaREtgh X-Received: by 2002:a05:690c:113:b0:615:800d:67b2 with SMTP id bd19-20020a05690c011300b00615800d67b2mr5837099ywb.29.1714031351214; Thu, 25 Apr 2024 00:49:11 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q17-20020a632a11000000b005f401ccd0e1si12705105pgq.555.2024.04.25.00.49.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 00:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-158146-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158146-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E9D9EB23325 for ; Thu, 25 Apr 2024 07:49:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72C2A6E5FE; Thu, 25 Apr 2024 07:48:56 +0000 (UTC) Received: from mail-yw1-f178.google.com (mail-yw1-f178.google.com [209.85.128.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0CCE5D477; Thu, 25 Apr 2024 07:48:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714031335; cv=none; b=MfiNw1Ic6mKVDn9nuJYW8B7em7lEVoNHzipyJHJ1Z6MuOmuKhUsI/VHHUKqe7r0II238hm0j5xST1RepoMbHiqyKSjBirDi/Z3hNJfwJpHSa9cx1MmGvZ2kTjyHScAi+YG80qrhawD9J1P0Vl88LseYhZpVsORAywduncAYa+So= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714031335; c=relaxed/simple; bh=QWzMqnvNDE3uWpTxgV5Wt0uL05nTU10AMdyKsaDyklo=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=erq9r3H6ntdhqxpOFq9UnIwMUtT9WXcA8NBggdrGotswXbrHpMtjnTDROcgg2WVlaRV9Q/9ciGhMTVWsVrieaLNiEdylD9KfeqJpPGJUjLmkz4vEwNQf4wYVWYbUMmR/v69n9ffbFOv66Nw7Ic/e+LSbvgOaSB2TB9cfBjrwkPU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.128.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f178.google.com with SMTP id 00721157ae682-617cd7bd929so6972277b3.3; Thu, 25 Apr 2024 00:48:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714031332; x=1714636132; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jCeLs5NAma1XU37XgksPfxny5o1JTn/LLmRqHaQAAv4=; b=oBTZ/fM+KgsoyB6VwO+2xK6hqHtiXcghR+qvILjU7p5ICnoi2zNFMqQZEJUnYD2ZFe ODZ8uBCLBW/+pTauzs9Nch2CHbDEdOJnXDDZ7vFvqsiJs5FjhmqhD0TTsjiX6o+ZABLB MqeM/f5VhREVHK2sXsCUZMT505PzRqVC9x9qxoy6uefmjlsg5+RtOMSzAhnLZpLcZyt5 +ieCj6eWidYQjwzKtp+YXG8I86lUg0M8BemwTOM++uq5EcxDnhf/UCs+tSgAQSPxkk+Z j6tsFCdf/XkD684u6vnv7f0OGevERxRQPdwCvQDo17wEpK49jAhzQITlmrS8vv0eVeH+ bpqA== X-Forwarded-Encrypted: i=1; AJvYcCXjoI9DSIO39MCFkBW4GB8avXjTsTUTQ4HEbnmQE1JOnaCJyW8MjhYR7JTlpIsopiLQdpL41J+QpGsy68wfHwVPchlCjKm9RQ164GmrvKJWyecREB8xM7gFJVsrDtxA9D9h2cM15M/L8ODZ/icDOiC1M9FsT2fypgPf5KnD3tbvgWrKQVU= X-Gm-Message-State: AOJu0YzQjJMUiKJ1MDL+xgC+Q57rSGHbrCrKv0EvpMl5iq2H2yel9Zir n17A/QjliZ/p2RmqHf2qeS4oAm0WoE3RecWCgy6BeLnk93gLQj/2i5MZuSNyfCA= X-Received: by 2002:a05:690c:64c3:b0:61a:dc61:25e2 with SMTP id ht3-20020a05690c64c300b0061adc6125e2mr5247377ywb.49.1714031332194; Thu, 25 Apr 2024 00:48:52 -0700 (PDT) Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com. [209.85.128.171]) by smtp.gmail.com with ESMTPSA id y76-20020a0dd64f000000b00609f4170662sm3444253ywd.54.2024.04.25.00.48.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 Apr 2024 00:48:51 -0700 (PDT) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-6184acc1ef3so6633687b3.0; Thu, 25 Apr 2024 00:48:51 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCWqzvnLZ8UI4QbwgPaqbVZqQymjU2WOO1r8Z04I7cVK+BGwlU9DyNL/8YvCugB6ZqwYfF9Myoym4kfjHnandmfM6KIo/MtISDxTuMXf/WROio32h1I5ZJ5vdpMH85qP4/Elah6pk754IlgKDWe0H0rGkFR5AtCTUTks6iU/Ec6w+g2wAr4= X-Received: by 2002:a25:109:0:b0:de5:5aaa:7881 with SMTP id 9-20020a250109000000b00de55aaa7881mr5977202ybb.49.1714031331725; Thu, 25 Apr 2024 00:48:51 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240425070936.547100-1-claudiu.beznea.uj@bp.renesas.com> In-Reply-To: <20240425070936.547100-1-claudiu.beznea.uj@bp.renesas.com> From: Geert Uytterhoeven Date: Thu, 25 Apr 2024 09:48:39 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFT PATCH v2] serial: core: Call device_set_awake_path() for console port To: Claudiu Cc: gregkh@linuxfoundation.org, jirislaby@kernel.org, tony@atomide.com, andriy.shevchenko@linux.intel.com, l.sanfilippo@kunbus.com, tglx@linutronix.de, geert+renesas@glider.be, ulf.hansson@linaro.org, peng.fan@nxp.com, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org, linux-pm@vger.kernel.org, Claudiu Beznea Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 25, 2024 at 9:09=E2=80=AFAM Claudiu = wrote: > From: Claudiu Beznea > > In case the UART port is used as a console, no_console_suspend is > available in bootargs and UART port is part of a software-controlled powe= r > domain we need to call device_set_awake_path(). This lets the power > domain core code know that this domain should not be powered off > during system suspend. Otherwise, the UART port power domain is turned of= f, > nothing is printed while suspending and the suspend/resume process is > blocked. This was detected on the Renesas RZ/G3S SoC while adding support > for power domains. > > Based on code investigation, this issue is present on other SoCs (e.g., > Renesas R-Mobile A1 [1], IMX8QXP [2]) and different SoCs have particular > implementation to handle it. Due to this the patch added the call of > device_set_awake_path() in uart_suspend_port() instead of having it in > the platform specific UART driver. > > [1] https://elixir.bootlin.com/linux/v6.9-rc5/source/drivers/pmdomain/ren= esas/rmobile-sysc.c#L116 > [2] https://elixir.bootlin.com/linux/v6.9-rc5/source/drivers/pmdomain/imx= /scu-pd.c#L357 > > Suggested-by: Ulf Hansson > Suggested-by: Geert Uytterhoeven > Signed-off-by: Claudiu Beznea Reviewed-by: Geert Uytterhoeven Works fine on R-Mobile APE6 with console suspend support removed from rmobile-sysc.c Tested-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds