From patchwork Wed Jun 9 10:01:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 12309493 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=-17.0 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_GIT 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 7E6F4C47095 for ; Wed, 9 Jun 2021 10:09:15 +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 4EE736128A for ; Wed, 9 Jun 2021 10:09:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4EE736128A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.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:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/Z8F5EngEnCWeNQ3HTukIDwZ4qge8UL4fjN28s8EP0U=; b=P12ifPbqxg7Qle XMpXkd7D3jE8AUjMiIFAUubJxdINSXZYQIQozytgd5WlFoudN1DOF+/nVTt3nPj/19kpVzv2kek+f FIBz1MnEuZypR5SG1Np93BwddJYR3NR5HBpzNgiFoj7M2UHochCo6Ee+rJLD8AIyLcv7peVfCVUd9 uWpdyRejlBEvs3qN+o2izY4HRssKUh4RO2eGjcSZruBtL63GVfKtyjGBzfiWohH+m/xG5q/+FL21s 3S2bagv5J86cqPJI79Z824qN9pVCu6fWv8a7WIS47t2dvnSXPVv4pPJI2nlUYImrugXh8cPHi1xEI UApOFx40EhfLtLtEcGnQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqv6t-00CtQb-03; Wed, 09 Jun 2021 10:06:57 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lqv2D-00Crpv-Jh for linux-arm-kernel@lists.infradead.org; Wed, 09 Jun 2021 10:02:07 +0000 Received: by mail-lf1-x131.google.com with SMTP id i10so37112341lfj.2 for ; Wed, 09 Jun 2021 03:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c+obMq8PkB/J8Gdch4+1xb+KTFZm3rBY/BnhHmvQsV4=; b=eU39jTtEgR1GfHTSSAqzHh+RGy59HSkMiKWeIm09OWilH4HdLfnzNvGEZ0UIpD2qaY eoxivEtj4oox16nimgTMac45NRT/pF1gN2ujJrLOvRvG+JRR8NsY1uUqaAg7GxiSWsSh 142XtSfyxIsOGCjxLemGLwdjL0Zx/6E/VT56/jWdUI0stijRfcsdP4kUK2zSGrwLYiC1 lQCcxSAUBOQ38Mfn8B8pvm+dGOyj6ISEyKCR7KMPiziySnAvnvuCQk4yNn9xM71Zqhc6 9aTJmbK39jfklrBfF7fkGAtQ7YVn9eN63Hktfra24OD+kyjQZp63g34zI6w5Cli6uqpa 8iMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=c+obMq8PkB/J8Gdch4+1xb+KTFZm3rBY/BnhHmvQsV4=; b=khr0pZbqQlhOCN76YAdj6WoDRwGkP0ZKj/1BbY1FjzdYK8x5vSOzVpJ3aTR8rA4G3I 6K4wUyN/BbEcVgCaHuTzUFQGONu2T/YDoHe0ind4VrBnqaNofnAP6I22SZld6jiCExnP BZsc3XoHVDSMSxy2wlkxbVucu6WZeMpwimpNEHGa6Tto7hJavFR6KUribluB4czLkAJF HQrgu+MFaJCgvuTkgiHsIE/k/jOrCfoGHnyr39RIuSejhkN/L38xT88s6eOis+egxidW 60yF5VbqpQBMxnxZIkW1vU0lAItxGYoYIoRQKJkvznevPH78WCX1ZHbmO8aBrMIj2UK/ mS0w== X-Gm-Message-State: AOAM532LQRemAs7A/T3baozpFzhi6F5avEWetCV1xRgo18UcQloURb5w 6BZG2qGD38IP4SB3xaihvv3Dvg== X-Google-Smtp-Source: ABdhPJz/JqTi8eCZ9SlLhcOgRDcSvhoHDrLDQjmIIP5Iq56QWpjOlyySou2dxMQOppHxqQHaBYMOlg== X-Received: by 2002:ac2:5ccd:: with SMTP id f13mr18641335lfq.185.1623232923531; Wed, 09 Jun 2021 03:02:03 -0700 (PDT) Received: from localhost.localdomain (h-155-4-129-146.NA.cust.bahnhof.se. [155.4.129.146]) by smtp.gmail.com with ESMTPSA id w24sm300041lfa.143.2021.06.09.03.02.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 03:02:02 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Ulf Hansson , Saravana Kannan , Alan Stern , Adrian Hunter , Tony Lindgren , Kevin Hilman , Geert Uytterhoeven , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 3/3] PM: runtime: Clarify documentation when callbacks are unassigned Date: Wed, 9 Jun 2021 12:01:57 +0200 Message-Id: <20210609100157.97635-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_030205_729296_04978D10 X-CRM114-Status: GOOD ( 13.56 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 v3: - Fix spelling and further clarified the behaviour, according to comments from 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 +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 manged +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. + 9. Autosuspend, or automatically-delayed suspends =================================================