From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C4D3C48BE0 for ; Fri, 11 Jun 2021 17:06:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 23C6560C40 for ; Fri, 11 Jun 2021 17:06:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231346AbhFKRII (ORCPT ); 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-Google-Smtp-Source: ABdhPJzRF9YDfJw1Ds2/HmqLY1bYqvhDDai3/DGOsGM+1GqpiViH7ZIwA3tPPZj8eT/rPGMfzdbpbq4c2+q6UIa5/ho= 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! From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BFA9C48BD1 for ; Fri, 11 Jun 2021 17:14:02 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2097C6124C for ; Fri, 11 Jun 2021 17:14:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2097C6124C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RwgUlW461NpenQGyXljLhzk9Utxeek/MEVwL2sAjB0w=; b=d3N7BRi0j8R2AP FGFzWS3MrYKWc5k4WVwg3p22VTLGw589lFsAxX6XSISBODXRmh+WQkNcDVCJ8kKRb9NaTp4p/2kwI qa7SDi9BbtZId1S7t9/yrjQeudCNjvyh/cEd4vIzfMeMjy1otiSTSmnId7CJzZ55ZTe04XXEP0mjz xd5/6ATprco5psRqZfTJTjULun35goc/qJTHO6tcGeJjI91qvjwXBdvdyy3Jarp2MLJE+VoYTp77t oRLYiG7SVz8kCdX/dhHd0H97hMYFvrmrU2z9Hr0dV7tu1kSeN12U72sjmaZHA129wIjViq1UASf9c c5vfrbx0cVUOhlKpytpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrkh9-006GZb-5c; Fri, 11 Jun 2021 17:11:48 +0000 Received: from mail-oi1-f169.google.com ([209.85.167.169]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrkbP-006EAY-HW for linux-arm-kernel@lists.infradead.org; Fri, 11 Jun 2021 17:05:52 +0000 Received: by mail-oi1-f169.google.com with SMTP id v22so6495518oic.2 for ; 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=TT67a35GG3JPIDRd+CxkVFnXjB6FCTxaImjC3uSqQqYpEp7IaeLHT54ENeEp/GDCG1 UCaek1LQY4Kb5DjD7Q4HN8/Gy/1rm8nwr28SXHoMx9RXRP8mDpocGmALmUeipHys4nw0 cvCfFcauW0vTAJpWQs5DGVOIHCCcOwChZBvj9u1FJo0lMLi+ICtCYcH0AaGmUjT9/dMe 50IntEWIE3v19SxMtWPozezyw2aslxZSc24v/pNyrjOnSjXpJR5965bObAwxu71Tbcf3 QS6lmAl+9vDuKqYrUPqdsm957IIFHur17Kj6zMPWEJBdsU05T2+8TPyCiWubsyyu8V6E Xspg== X-Gm-Message-State: AOAM532MSqTRskFnYK0jik+OFhTq7S3nIxFTc7HHxxozS7zf7bV5J9Xz pppk0LKPYLdsiwMLoj696kh8wv60tfSWu3p3ELc= X-Google-Smtp-Source: ABdhPJzRF9YDfJw1Ds2/HmqLY1bYqvhDDai3/DGOsGM+1GqpiViH7ZIwA3tPPZj8eT/rPGMfzdbpbq4c2+q6UIa5/ho= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210611_100551_621135_002099C1 X-CRM114-Status: GOOD ( 25.78 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel