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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 CE258C48BD1 for ; Wed, 9 Jun 2021 15:29:38 +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 94AC360E0B for ; Wed, 9 Jun 2021 15:29:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 94AC360E0B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rowland.harvard.edu 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tSj1hW4NSCG1vqeTI9fWVH8vI7MihR3VZDQifSn7fzs=; b=azxbfKW9YOD5ts aAYeVu5vv4xtm+I4/eHoeNts2FnjAU87J4rpHVMHydDemmLaUBB4g3HfUBfYkMpfDhecG9scuxmh9 +SestK26DVX40rCiBB52s1xotDS0NVz8YjrzqkHpNr1w0T44vg7IYM1Pgmql+nB8NWyikD8whWWS2 6g8aConaXeOVHC7ium3qactpfqd0k9XU7jzsKldUpuitnp3KKPdomCTSunHE4dam5uX25CNZYhdc1 a/KlSbZpClb4Wi5Cs2/XkWcX7bqBDjsTFlnRHf9wNTassm1zfoofzRnSGpb5w5rN0KHHk9OOOPcNy 72QvhIRZ9uh8l6ReAyNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lr07F-00Eaml-FL; Wed, 09 Jun 2021 15:27:39 +0000 Received: from netrider.rowland.org ([192.131.102.5]) by bombadil.infradead.org with smtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqz0N-00EFbx-US for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 14:16:29 +0000 Received: (qmail 1843599 invoked by uid 1000); 9 Jun 2021 10:16:23 -0400 Date: Wed, 9 Jun 2021 10:16:23 -0400 From: Alan Stern To: Ulf Hansson Cc: "Rafael J . Wysocki" , linux-pm@vger.kernel.org, Saravana Kannan , Adrian Hunter , Tony Lindgren , Kevin Hilman , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/3] PM: runtime: Clarify documentation when callbacks are unassigned Message-ID: <20210609141623.GA1842836@rowland.harvard.edu> References: <20210609100610.97830-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210609100610.97830-1-ulf.hansson@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_071628_172893_CCAEB698 X-CRM114-Status: GOOD ( 21.69 ) 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 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 I don't know what happened before. Maybe the terminal window got resized without me noticing, so the lines looked too long when they actually weren't. Alan Stern _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel