Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5010884pxj; Wed, 9 Jun 2021 07:15:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfrn8XxpQQObjnavab8OR96NpMS7EfQlu/T1iVyKtWJpK5rYhmOyv5LKssWzgYR04iKEdS X-Received: by 2002:a05:6402:2707:: with SMTP id y7mr12778698edd.0.1623248103647; Wed, 09 Jun 2021 07:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623248103; cv=none; d=google.com; s=arc-20160816; b=nkqu45KdWVwnV+/6505x5slVZW+HE/41lxfPlmgJXehIBR9POizpyF2rvB9hVoIQnt 1S0qfLtSVcYWXqq7hssbxwOowJYIXjpz9AUm7jFXvxVsTGE0KqOQRgAi1npid8wH913h //wWk9Kyb7HXeo2lEO/u4ZdyhsNsCFVGq7lezU4im66UUlR0Ab4Zxb6cuWjJZuRPVfQ5 EDTBpro85/2KtS2ZYtpqSMrBR5ZH+z5ntQeurhH+L4K2foO8AsC92qA+Mgq4Vyu3luOE U4Jen2NpLsMmUtqY26GVztT+KAaM1H6xSqJ9e2jLL+OnFhpRDHGSvPen0cgejMKtliKc c3/A== 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:dkim-signature; bh=cDVcIBWGDWM1PdDfQAVglfmSkwPbg11fBeIYPrXJ/UE=; b=pZx42BoizS9t7p4Mm9zFAreej3xI17PQZTfisx3vEN6mkzx3Qb4WXHLDO4pUF8QlII 07s5CkQqn+SwJ1FU7L/QnogzYufjH2ZR1RkMuowK0YGubLEIDdU6zFyurSIigAXc4taQ 9EWR7peJXZHeGes4v22sKbc9k1ePv92lcmwO3moKNAdpKqt2I0Nd53Dqy0QgtOYpdl5D 14OfR+Irs/NG3s/N3mH8mc7pWr8e7tVmZeevbd+1G54lDwi1BR3C6DRRN/voM1jkGUXA 4uxoVJ2+bwPUXg7AVBQWQCeQ0IKClUqXiZev2vL+yCTnzAryuZ7ZiRO915zl9R1l3sUS q5fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FhEYZOKJ; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si2593334eds.244.2021.06.09.07.14.39; Wed, 09 Jun 2021 07:15:03 -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; dkim=pass header.i=@linaro.org header.s=google header.b=FhEYZOKJ; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235561AbhFIJrj (ORCPT + 99 others); Wed, 9 Jun 2021 05:47:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234017AbhFIJri (ORCPT ); Wed, 9 Jun 2021 05:47:38 -0400 Received: from mail-vs1-xe2f.google.com (mail-vs1-xe2f.google.com [IPv6:2607:f8b0:4864:20::e2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CD3FC061574 for ; Wed, 9 Jun 2021 02:45:44 -0700 (PDT) Received: by mail-vs1-xe2f.google.com with SMTP id 68so187593vsu.6 for ; Wed, 09 Jun 2021 02:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cDVcIBWGDWM1PdDfQAVglfmSkwPbg11fBeIYPrXJ/UE=; b=FhEYZOKJhzxspT2d9TFZAKGjjqIfVENB2iSfH/Fwt0o+FXReR7ZOUSms9DEaWnu8rV o5e7KPr5YKzzz7KJvHHf5CLRevXm63ElLQDxbJd34au9Bu7aOD9lSrqngzz4Hx1dWCbf YNe25SFeIfKi6D/DBjDlm3WIa9Le0iwzjFLgmOw5XF3OUp+kkEE0+vHSn3F4OPTtY5+5 TlqgfrUEjQjegaHPx8FKW0NRVi+fIl23yxILbGiDjKJJ6y2H5rK055h6FhyR/AaTg88s OmEZyXdPtB5DzQ5A1kFBxEl7le8MVMA7AJ7gLHhCsO/e1/B4AIOj3TfPc9141Inc8LrF sGTQ== 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=cDVcIBWGDWM1PdDfQAVglfmSkwPbg11fBeIYPrXJ/UE=; b=kJaPtWN4nvWuAE5/sB/cE52DF5pDRVsJ6kc/nnP/mwrYaE+Q3a5hglqjSQB5paEU1i dNlBfADgexzqz/nBm1wWqwLPiN0zpGGHLYfqlUmu0ENyDhxZz2OcU61dtkLUipHENGBp tJ2U5IWrPvZFy/DXLfMNtNbgHAW5erah4bawlYAWtDF48oW46yEuRvnvRmHhNzg2aWLn s1QAZuSLsTYp19j3O4VDhdNr6hfOYoBhBxP+6+Fd5hXGwkVzOdYijFYbSb1hbgPx5uOk M5i7UBWDd+AfNDRSBnr42fYcwgKi38mCr9VemA1/3knCRGca0axO+Bl0XygjuQvNEVJA H0Kw== X-Gm-Message-State: AOAM531D8cKQ998WuIT+ARQ6XNJ7rUqbsWeMIHcX5wXnCV2N+cppdim9 /8RcXbRpvOetAczTJ+y5s3JaO22NCN4Dnb/ARfugXg== X-Received: by 2002:a67:e359:: with SMTP id s25mr3271454vsm.55.1623231943491; Wed, 09 Jun 2021 02:45:43 -0700 (PDT) MIME-Version: 1.0 References: <20210608090250.85256-1-ulf.hansson@linaro.org> <20210608090250.85256-4-ulf.hansson@linaro.org> <20210608142325.GC1804083@rowland.harvard.edu> <20210608144905.GE1804083@rowland.harvard.edu> In-Reply-To: <20210608144905.GE1804083@rowland.harvard.edu> From: Ulf Hansson Date: Wed, 9 Jun 2021 11:45:07 +0200 Message-ID: Subject: Re: [PATCH v2 3/3] PM: runtime: Clarify documentation when callbacks are unassigned To: Alan Stern 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 Tue, 8 Jun 2021 at 16:49, Alan Stern wrote: > > 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. Perhaps it's the email client that messes up the patch in some way. This above line in the patch is 79 chars. If you have a look at the patch in patchwork [1], you should see (I hope) that it respects the 80 chars per line!? > > > > > +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/ Thanks for spotting this, my spell checker accepted "manged". :-) > > > > > +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 Kind regards Uffe [1] https://patchwork.kernel.org/project/linux-pm/patch/20210608090250.85256-4-ulf.hansson@linaro.org/