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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 9FDD1C4743D for ; Tue, 8 Jun 2021 14:49:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8C33E61183 for ; Tue, 8 Jun 2021 14:49:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233586AbhFHOu7 (ORCPT ); Tue, 8 Jun 2021 10:50:59 -0400 Received: from netrider.rowland.org ([192.131.102.5]:46905 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S233576AbhFHOu6 (ORCPT ); Tue, 8 Jun 2021 10:50:58 -0400 Received: (qmail 1806040 invoked by uid 1000); 8 Jun 2021 10:49:05 -0400 Date: Tue, 8 Jun 2021 10:49:05 -0400 From: Alan Stern To: Ulf Hansson Cc: "Rafael J . Wysocki" , Linux PM , Saravana Kannan , Adrian Hunter , Tony Lindgren , Kevin Hilman , Geert Uytterhoeven , Linux ARM , Linux Kernel Mailing List Subject: Re: [PATCH v2 3/3] PM: runtime: Clarify documentation when callbacks are unassigned Message-ID: <20210608144905.GE1804083@rowland.harvard.edu> References: <20210608090250.85256-1-ulf.hansson@linaro.org> <20210608090250.85256-4-ulf.hansson@linaro.org> <20210608142325.GC1804083@rowland.harvard.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 08, 2021 at 04:30:48PM +0200, Ulf Hansson wrote: > On Tue, 8 Jun 2021 at 16:23, Alan Stern wrote: > > > > On Tue, Jun 08, 2021 at 11:02:50AM +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 v2: > > > - Added a new patch for the updating the docs, as pointed out by Alan. > > > > > > --- > > > Documentation/power/runtime_pm.rst | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/Documentation/power/runtime_pm.rst b/Documentation/power/runtime_pm.rst > > > index 18ae21bf7f92..3d09c9fd450d 100644 > > > --- a/Documentation/power/runtime_pm.rst > > > +++ b/Documentation/power/runtime_pm.rst > > > @@ -827,6 +827,14 @@ 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 More than 80 chars. > > > +pm_runtime_no_callbacks() for their devices. This could be because a subset of More than 80 chars. > > > +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 manged s/manged/managed/ > > > +through a supplier device link. For these reasons and to avoid boilerplate code More than 80 chars. > > > +in subsystems/drivers, the PM core allows runtime PM callbacks to be > > > +unassigned. > > > + > > > > You should also mention that if a callback pointer is NULL, the > > runtime PM core will act as though there was a callback and it > > returned 0. That's an important consideration. > > Good point, let me add it. > > I send a new version of $subject patch, unless Rafael is happy to do > the amending when/if applying? > > > > > Also, notice that this file was carefully edited to make sure that > > none of the lines exceed 80 characters. Your new addition should > > be the same. > > Absolutely, but it should be okay already, no? See above. Alan 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.4 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,URIBL_BLOCKED, USER_AGENT_SANE_1 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 34DB5C47082 for ; Tue, 8 Jun 2021 14:50:57 +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 0549E61183 for ; Tue, 8 Jun 2021 14:50:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0549E61183 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=Z2LsyLwaC73foWwqwQ0SbZU+ecf5hPYKl879xnfEtqQ=; b=goYvUR8s2AIW9p pvB92ZFXH6JqpOQ9ExjjHITJwrwK6Dnm/rtiqy4sLZO4q1dwKmuFhX/D8RcZ80RGeUmkaUn5/6EOR 5VWABHkcDVg0gNQXsG8zBPeGNjlSC4U4Wo2c6f3uhJdjCT00x8Zn4CsTZT4AgVqYGZ4LGwBz1OYxH /BP50U7a0J3C4vttgx6zVPU+QUDj4erI4XF0z6fULahCON7LW62x91fLJJ0XAqHxXoZQJjS9oa+BY aacqU+YctYaPtj1Y0/JixZD6xa1rO2XDrGY3bGra51g2zBHxA/qZtJR2+mGYzLHIGJtWp5PRqD0XL 8r9NEJ176jzX5j2aMQCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqd2U-0090T6-1a; Tue, 08 Jun 2021 14:49:10 +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 1lqd2P-0090S4-TP for linux-arm-kernel@lists.infradead.org; Tue, 08 Jun 2021 14:49:07 +0000 Received: (qmail 1806040 invoked by uid 1000); 8 Jun 2021 10:49:05 -0400 Date: Tue, 8 Jun 2021 10:49:05 -0400 From: Alan Stern To: Ulf Hansson Cc: "Rafael J . Wysocki" , Linux PM , Saravana Kannan , Adrian Hunter , Tony Lindgren , Kevin Hilman , Geert Uytterhoeven , Linux ARM , Linux Kernel Mailing List Subject: Re: [PATCH v2 3/3] PM: runtime: Clarify documentation when callbacks are unassigned Message-ID: <20210608144905.GE1804083@rowland.harvard.edu> References: <20210608090250.85256-1-ulf.hansson@linaro.org> <20210608090250.85256-4-ulf.hansson@linaro.org> <20210608142325.GC1804083@rowland.harvard.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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-20210608_074906_119463_278A555E X-CRM114-Status: GOOD ( 29.52 ) 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 Tue, Jun 08, 2021 at 04:30:48PM +0200, Ulf Hansson wrote: > On Tue, 8 Jun 2021 at 16:23, Alan Stern wrote: > > > > On Tue, Jun 08, 2021 at 11:02:50AM +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 v2: > > > - Added a new patch for the updating the docs, as pointed out by Alan. > > > > > > --- > > > Documentation/power/runtime_pm.rst | 8 ++++++++ > > > 1 file changed, 8 insertions(+) > > > > > > diff --git a/Documentation/power/runtime_pm.rst b/Documentation/power/runtime_pm.rst > > > index 18ae21bf7f92..3d09c9fd450d 100644 > > > --- a/Documentation/power/runtime_pm.rst > > > +++ b/Documentation/power/runtime_pm.rst > > > @@ -827,6 +827,14 @@ 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 More than 80 chars. > > > +pm_runtime_no_callbacks() for their devices. This could be because a subset of More than 80 chars. > > > +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 manged s/manged/managed/ > > > +through a supplier device link. For these reasons and to avoid boilerplate code More than 80 chars. > > > +in subsystems/drivers, the PM core allows runtime PM callbacks to be > > > +unassigned. > > > + > > > > You should also mention that if a callback pointer is NULL, the > > runtime PM core will act as though there was a callback and it > > returned 0. That's an important consideration. > > Good point, let me add it. > > I send a new version of $subject patch, unless Rafael is happy to do > the amending when/if applying? > > > > > Also, notice that this file was carefully edited to make sure that > > none of the lines exceed 80 characters. Your new addition should > > be the same. > > Absolutely, but it should be okay already, no? See above. Alan _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel