From patchwork Tue Jun 8 09:02:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 455765 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3492120jae; Tue, 8 Jun 2021 02:03:07 -0700 (PDT) X-Received: by 2002:a2e:3311:: with SMTP id d17mr17894834ljc.382.1623142987814; Tue, 08 Jun 2021 02:03:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623142987; cv=none; d=google.com; s=arc-20160816; b=NdY1r7ZhyCwEdPZXLO90XnR2pgsneEz8M/PqDnKsxKIgTnTW9eOZTDXIXD7dW8rrqC ZGfFHUmXViWThnlzb7oyNFqoD0dHYYLd78ssxlM2VCADFaSkI5PKr4xodRE7EQbkWJXK 9MfBvE0YM97tSBukxhvS9rBb3sokHRtoZN3Q7PXNPT1dEOxYWJC+0oUaB/xHkM8KCi4m tO/uRY6GRG7v7XjEynrOzZUb2eOCzjiwsUnHrbjd+YiCfjqWTHK6iR+yQ8sUlMR5awXZ OdFAYxSgXBLH7V9dYRPZ1wFmCLNogra4tfwzt/UeyH7Xw3GFRdXmtxn41jxBxVnjY7rp 3Yhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ehN5ksOKPDeXaQtxFuYUYGE2SbISLeBDzZHvbFwjLMU=; b=u9ep22MxATlKvMCJ8Jyc4M48d8bRy+x51GkJJ7eCROz0bEWiq8M+5ir3fkN7vpeiaJ wAP7EnPP9uTp99Rso4lD0YpiR2LgClc5MOhF54DJksd4W9FAYW+6nGdMl+0WT4VsFmoo vljR7voBgeC6h5Q1piXkIxQbeQO1a4q8nvK+if69nOxp3tng5fVnHe5j+TI/lqt5+cei Dz0IyEB5y4tP892JfJStiJ74b2VTRxOJffWwbrRVoP0I4AXLLLPhd0hqvFC7zi/nvRTQ jJFVXSdv94o3YLx5RutIu+MX0cPt3/RzIVcZM52ExWWhcAIe/F+81EYuK4SCvSVfmcUg A6Vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YXZJiLTX; 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 v25sor5078036ljj.43.2021.06.08.02.03.07 for (Google Transport Security); Tue, 08 Jun 2021 02:03:07 -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=YXZJiLTX; 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:in-reply-to:references :mime-version:content-transfer-encoding; bh=ehN5ksOKPDeXaQtxFuYUYGE2SbISLeBDzZHvbFwjLMU=; b=YXZJiLTXuA3ySx4PD3wFxfxV+h5X01WFA/yCzSnXtG/SROViS31q2Xpf7c6R6T2uXn /QeDgMD14hOG36l9z4wdggSIniQ0PWuRpuOs6HNWGlfvUy4BZp4+z1wm8G8818dfoF13 Rwyen/We5cQJntTe4/vHwQG9ZrKl+eEwgrYwNso5O/dSf6iTkIHUIlEEyRGc4SY8BiWo 1VMRoJIHaYmSJ/ocMiVmEPvfFc2Af7tNKsRLJ3+gH8OzIxbVgXOIRGjNxDDmO2duNy4t A+b4Fv/FLcq+ITMNhQrGRmPh6NVEUQdJ3BupS+5llrFBcnvUG+7cIrsTXp4ZFQw/Exmh WNIQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ehN5ksOKPDeXaQtxFuYUYGE2SbISLeBDzZHvbFwjLMU=; b=Zynrce/Ga2/SilD+KD9h6ZnFp2CSOCYNK4LnxCu/6HZUBGijXLqa2Le5s/Yx22cdaW CdnypGFiwET+1J3lqlhzroWA5LXtKYzKGJTHbYbV5TF3KzYKcsJPRAdWnwxH56v1dpXH GZEraoNt6LdonVg46XdSMMW1tpCwV/63p99gJftPoLnbxsFK3/DHVgS08uExdWpGGaGU ARhPW0SyR5jrWPQqDT71IcTB9cvdl2/X2RXvJDLTk7p7citE3KhvIQS5oRAGbOEBX5jE /cywUiedCQYvDee4VaNGabr74eDYHF3YbGkhHKH/Byhe92MmPPXyXo3cC5CIplWQKTub +GPQ== X-Gm-Message-State: AOAM531WFeMZNhrGYl9WFByY29fTzXe2QYPzNYt/tGJ8FNfMO3RBPxSA rBPAz7iv4aKVtO8drd1oIV5vtO85 X-Google-Smtp-Source: ABdhPJz3SwQ9T24mG2HslSdPG6wDOlx6diMgH43qf1V0qfrzdC4lFXrnIIfuLG0XzfSUioSrputIGQ== X-Received: by 2002:a2e:a603:: with SMTP id v3mr18072187ljp.175.1623142987476; Tue, 08 Jun 2021 02:03:07 -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 n17sm1295197lfq.118.2021.06.08.02.03.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 02:03:06 -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 v2 3/3] PM: runtime: Clarify documentation when callbacks are unassigned Date: Tue, 8 Jun 2021 11:02:50 +0200 Message-Id: <20210608090250.85256-4-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210608090250.85256-1-ulf.hansson@linaro.org> References: <20210608090250.85256-1-ulf.hansson@linaro.org> 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 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(+) -- 2.25.1 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 =================================================