From patchwork Wed Jun 9 10:06:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 456812 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5094209jae; Wed, 9 Jun 2021 03:06:17 -0700 (PDT) X-Received: by 2002:a05:6512:33c2:: with SMTP id d2mr8642232lfg.443.1623233177001; Wed, 09 Jun 2021 03:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623233176; cv=none; d=google.com; s=arc-20160816; b=ROruNqbcL/vj/Ctx62VP4HUJ89ZkRruGXdYtf6GRvOuhNs2rW7ty7g5BnSoonIRtYk fUx2G1H6JpHyHA1NNKUXiln6D+O2Zs4AfGLLBuY1VC5O4qlvgo/8Eoogf8RMhcW82d1D g2vkbxr1tRZ4tRpCqdgzZSOQTAMqXrQYsip28wvjzi8rWPPrqBBmOjzgwAjqZuhgG7iG kARLK0tDemp2qyihmP6IjZQXe1QXd7hta8YZpDsjzODFFpBJLpzEWR1wVcjJpbnHSAoH Yk6oybWvLifB4mGJPD/HL79AFJS7JUE8xfZSOpdnV4weS8A6RS7hlpW5iguf5aLjrkVk QSpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=kziI9SCt0c63nrukquSSDGhvQsklkwm80pK2jCkKV/8=; b=LmMHswwM3qoPQ+7D+on5xxBktpKSLqyIdY41s65pKGauwLizGnELQmu2TZmY+a4qWm xWyFWFhqmtGf/7OlI6lyrqa/YWrk7kVYWjHQNwd2VixASbizVFTpI4Tk2DyXD2hCuflU m1g4dxb0M3uJu/RLgf5zh8bIRNVNla8pliyBBkd9/LPuUwmpt2XR4YPrp/ZRYsRO7Tr2 JMRvqvF7CTCKkhMq59zEiwNyXG4SUVo84ahchejeF+VaCeDkky7VTukIanrIN6XfoM9f CmuZaypc2Tz9njYkJEvaW7hqudFCXahhu/a3+7vi7AElG/hfCXsE25wQ7c0wgW6BxjE8 GzXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ocAQ/4+b"; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id x26sor612166lfe.14.2021.06.09.03.06.16 for (Google Transport Security); Wed, 09 Jun 2021 03:06:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ocAQ/4+b"; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=kziI9SCt0c63nrukquSSDGhvQsklkwm80pK2jCkKV/8=; b=ocAQ/4+bpUOUubmy0uU8rzGkEcreB5FA8DJQDdC+qjuGWhw5aunQ5NGgkRjkWMQmrS ZPkmgqCIy7BQt934bRcyJXeojgGvACSQecdfuhspGw+IHhl4dH0Tndk70mE+WUPhwk/h fzd99G0iK1QAAGArcBXPMp0CzMbmaK5h7saGzD/089u7NTMvI9ou7jvtlPn8v37tBxHy ONC7IItbCe0GKsL68GQ5ylKowtkGn5LC9KfwaSKYBYA5bVSzLlssptqwJxn13WRqsj6y EeGLF3fmtLVHXMmFNybGofjBwZiPN1StkB20aD+hzMSRJtbfxUE2LF6zKNZKqCduqiFV wf0Q== 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=kziI9SCt0c63nrukquSSDGhvQsklkwm80pK2jCkKV/8=; b=d/EhjqD+MCw+buwe3zGWLNqGIHH/p9diz8bcKU8lfh80nFr77+7U5olt/Dme4rSfY0 xwZ9/mKnsiQ9hPFmAlUjqMUt0vvmzhYK01FV4K/gu4QKuUYofpm8XFq2f1k2efIPyuke mjoSq6qdQpq3ctCMkTNF+q6S3tH53xq8/Svc9opOyAMUZ4tYnME12wBg4D14jx+HfNxM k/DA5canW5exzDG0GlHMZHVAUwrGGpSB74sJLJiw1jEVmAOqKSuUfxwo5+OYDzx1hLky u1IfPkY91eNrU3Q1/wuqoYndTdToBakj89+5hGbH5TKOdgaRRY7iCcPLJkJ8Wp8NeXGA 0wbw== X-Gm-Message-State: AOAM5332LQI+NYfAxDlpKPlZn3eQRHk1GtZAfbxqoTTG40fygCj3oebN RPYuQyHcKbKt18kqc1izdRzqhIx/ X-Google-Smtp-Source: ABdhPJy3vLoeOu5r0E1JMWc+45Y9k4iikqrd7OlIr7swkKp5Gezd4tXOsSa6ac2rXxjOp9Hlx3QnrQ== X-Received: by 2002:a05:6512:31cd:: with SMTP id j13mr18401644lfe.445.1623233176628; Wed, 09 Jun 2021 03:06:16 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-129-146.NA.cust.bahnhof.se. [155.4.129.146]) by smtp.gmail.com with ESMTPSA id f11sm304406lfk.9.2021.06.09.03.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 03:06:14 -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 v4 3/3] PM: runtime: Clarify documentation when callbacks are unassigned Date: Wed, 9 Jun 2021 12:06:10 +0200 Message-Id: <20210609100610.97830-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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(+) -- 2.25.1 Acked-by: Alan Stern 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 =================================================