Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp736170pxj; Fri, 11 Jun 2021 10:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8eETnjU8tfZtI/R/ISCMRX77ZfLxre1qctph9SdyJ8r4yw0ed7+9bkqazYwiowsH1ecqz X-Received: by 2002:a50:fe10:: with SMTP id f16mr4815380edt.370.1623431264599; Fri, 11 Jun 2021 10:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623431264; cv=none; d=google.com; s=arc-20160816; b=bBesIbGRZm47hNkW3x/4KVRLWgYNVts5YSfBNtEACTEqvAaNJEfS0gacyfyeqbAfFD eHlcypNScziCzY9tPZGzNhNG+RwSgsZn8qgx8Rrf4ctPiuQ/1r7h7oclUDEkzkvfAkSP hbrpUM2MNGxwtg1CTzB0a7kuWdk0F6LZ9/MWjLXG9hCRjO7PIdWa+ZVhxs841QDS8j+A 7voPgw/Id++pFQZd3dGjm7IYVol1tGB7qgbJiPvNovJ3wY33LEfjYSD0uJZH0dbp3pt2 QnAMaOWo1lSgO9OXBmreFmcAPCuyD5Y/KZwsG8OV8PnhvrSTPv8PtNE/bO360WfhzBsT 7u8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=CXP2I4ApuWB5HpBIMgQb1QiH7C1vfyiKYMTo3USWuuU=; b=XyOMX+sJjGEIAQIlETFZekLIv2jk/cRMiUQbD/gDmWCj5yOWEo1c67yue87gVpa+4Q 77Mc7+e91obSPmxOmJzlCKPxrwCq4gz/MIvw5S7BTCX1XH8YtVVAY8HguqgVnztEqs0j 5Mc0XWmDJxt4WXhte4gZekINcLR6ksWEBV0y8vkp6ljlTsfiFBrWL47/ojMGvTwjtMaT vM5Fl2wKti9BbvTrKvzse2cbNewKGtlKGkC69865uyO8ltQhVD5gX8TKIcjMO3jaftvd sqrz1SjmtZ03TeaupCZ1OBxWbHObeDM6U7D6UN7RVAAKzzGlXRPYpsqfch2/Huu2oC4u l9zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r4si5106115edw.55.2021.06.11.10.07.15; Fri, 11 Jun 2021 10:07:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229685AbhFKRII (ORCPT + 99 others); Fri, 11 Jun 2021 13:08:08 -0400 Received: from mail-oi1-f169.google.com ([209.85.167.169]:38871 "EHLO mail-oi1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbhFKRIF (ORCPT ); Fri, 11 Jun 2021 13:08:05 -0400 Received: by mail-oi1-f169.google.com with SMTP id q10so2228306oij.5; Fri, 11 Jun 2021 10:05:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=CXP2I4ApuWB5HpBIMgQb1QiH7C1vfyiKYMTo3USWuuU=; b=hNgPx8wSocmbBfFlOpCkftShUbrUBZv8lsiWS8tP2Ou48Mb/wGXOX/1OjyW4frcqqb jHdYb3PPCKvDKGRxba3uQkJI2UiCf/p08uNvxkP1Yvfuio6yWp0FzZZiY+fNPDkW3aKV ddOTKunXEsWNFRCvUZhVw7HoYi/aZUZj6mswnS5bsXPKekdv+cJS6617oRiJcsjwS88E yZuSTzxLij5a8wveTGo+5u7WJyZ3sIErH6rwoPCWiAVJXhL1o0Rqdhtd3Rq26ey9V+7v dwOfKExzfyBLxE3OPk5gopIjtHnuOiDaskxYmXiUfaIJYo+iHzTWVzvI1sijqlrlsKgU ufkg== X-Gm-Message-State: AOAM533aO+O+llMeCVogk/oR3O2lvIppRsC9nZ5/0QivkU8wz1Z/mJGM fXzgcerhJRRBpqEE9DfWut/f117/UU2/kxQIQvzWRoBP X-Received: by 2002:aca:49c7:: with SMTP id w190mr999950oia.157.1623431150205; Fri, 11 Jun 2021 10:05:50 -0700 (PDT) MIME-Version: 1.0 References: <20210609100610.97830-1-ulf.hansson@linaro.org> <20210609141623.GA1842836@rowland.harvard.edu> In-Reply-To: <20210609141623.GA1842836@rowland.harvard.edu> From: "Rafael J. Wysocki" Date: Fri, 11 Jun 2021 19:05:39 +0200 Message-ID: Subject: Re: [PATCH v4 3/3] PM: runtime: Clarify documentation when callbacks are unassigned To: Alan Stern , Ulf Hansson Cc: "Rafael J . Wysocki" , Linux PM , Saravana Kannan , Adrian Hunter , Tony Lindgren , Kevin Hilman , Geert Uytterhoeven , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 9, 2021 at 4:16 PM Alan Stern wrote: > > On Wed, Jun 09, 2021 at 12:06:10PM +0200, Ulf Hansson wrote: > > Recent changes to the PM core allows ->runtime_suspend|resume callbacks to > > be unassigned. > > > > In the earlier behaviour the PM core would return -ENOSYS, when trying to > > runtime resume a device, for example. Let's update the documentation to > > clarify this. > > > > Signed-off-by: Ulf Hansson > > --- > > > > Changes in v4: > > - This time, really, fix spelling and further clarified the behaviour, > > according to comments from Alan. > > > > --- > > Documentation/power/runtime_pm.rst | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/Documentation/power/runtime_pm.rst b/Documentation/power/runtime_pm.rst > > index 18ae21bf7f92..8a0a43811e3a 100644 > > --- a/Documentation/power/runtime_pm.rst > > +++ b/Documentation/power/runtime_pm.rst > > @@ -827,6 +827,15 @@ or driver about runtime power changes. Instead, the driver for the device's > > parent must take responsibility for telling the device's driver when the > > parent's power state changes. > > > > +Note that, in some cases it may not be desirable for subsystems/drivers to call > > +pm_runtime_no_callbacks() for their devices. This could be because a subset of > > +the runtime PM callbacks needs to be implemented, a platform dependent PM > > +domain could get attached to the device or that the device is power managed > > +through a supplier device link. For these reasons and to avoid boilerplate code > > +in subsystems/drivers, the PM core allows runtime PM callbacks to be > > +unassigned. More precisely, if a callback pointer is NULL, the PM core will act > > +as though there was a callback and it returned 0. > > + > > 9. Autosuspend, or automatically-delayed suspends > > ================================================= > > Acked-by: Alan Stern Applied as 5.14 material along with the [1-2/3] from this series. Thanks!