Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5172670pxj; Wed, 9 Jun 2021 10:47:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/aFUEU4dgHXiUS484mY000k76pbsy2528cUR549wP1htHSmC2sMpzZXHZPnwvX8/iqBUE X-Received: by 2002:a17:906:2988:: with SMTP id x8mr1009588eje.122.1623260860955; Wed, 09 Jun 2021 10:47:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623260860; cv=none; d=google.com; s=arc-20160816; b=QhIsipU5Ycyh/l/CGmgJNwJBGFQ+JtiGidmY9w0dHxlUtXiZ5A6kvBi8STGiIBv9Cj CTZQNmK8IhMknsKvFUl07X7tjajFcXBrMo2zDbwkjx9+VyNEKfsXzvj5MfVjhKyZ7ljl GXBwRHHk6iyC5xlZpjs1Wa4DQt814N5SMF9mdCwx5JypWzpfo3dqhCGwfNI9RbN6SmIR YkdYDVxSxy/o9P0qoB/ryQI8Qrcc6ERq5kCRBoKy5RXssMcPx4EAdqe5lt0bT80coUj9 k5MBrHnOSRVW68HKNd6mDM3ekH3otjUAa4tiSCPDm2d8qNQaX302P2hWzUmOnPIfCi1c 5wVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4taUgFyTrNCX1uz+1szgukiOTnPj1SNpWVBEdSlI+L4=; b=oqFWpuVGiyu4FUfW5iUcSbxRy1ja3DHPdnaKpk01d0rrxP+Jl3eXYVgCqAD9aiXN71 6W9AqOWISY+OsGGHPMyv4fFhcsgBApd1iVgL69LWvUcKuLT9wjTSZpdteYJ3dCE7JD3/ TtqbFUDvSWVQghunvMhvpdMOD47mWmhxDd8w1W1YtFL9h1ja3i/XQVRDTLBgla9KGb3/ fj1jkEPKEyFWeKoJRO0CusUcv+d8w1LOCSItA6VlN0qjWnrYPlW76990IuMD+HGxcDHN o9sTFsdK2Z9LMrQG7GVr9WLx0ribIjUc9NG1wdT+i0+sup9FFLPpupYn9ZutoUY/GXlx SoqQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y10si348299ejh.531.2021.06.09.10.47.14; Wed, 09 Jun 2021 10:47:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233832AbhFIOSU (ORCPT + 99 others); Wed, 9 Jun 2021 10:18:20 -0400 Received: from netrider.rowland.org ([192.131.102.5]:59497 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S233850AbhFIOST (ORCPT ); Wed, 9 Jun 2021 10:18:19 -0400 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210609100610.97830-1-ulf.hansson@linaro.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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