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: 456811 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp5090708jae; Wed, 9 Jun 2021 03:02:04 -0700 (PDT) X-Received: by 2002:a05:6512:2294:: with SMTP id f20mr4729422lfu.585.1623232923989; Wed, 09 Jun 2021 03:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623232923; cv=none; d=google.com; s=arc-20160816; b=ykNPhnS4h8rv2sruLWsil4n342XzfIsUVQx3Gx0217rtJofz1nbHleUL+MrI7BdkSd 401MGObRGTNX4zSWhkE/lx2doI1cqRge4USAmWH/E1FlcJv4Va+i+xfPtwXi6Qi3IXXj pThBrw48ElK5HwejuDXAA1ThXaK8LVlhn8qX09ClpjZmsS/Grw/324SM2HEdyTipsfnv yMR3jjzgNAB5N8c98pMscJHMguCDxsszCsh2OdgYq3W+w9bigTtw08Tz9ry47okLG1Sa KYqJm9AsGk9q/Ox7axtKQ6Jj9Jc/v32ZRLr1/btp/z28E8qZxZMNd1lOTD/588iqd+de nyWQ== 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=c+obMq8PkB/J8Gdch4+1xb+KTFZm3rBY/BnhHmvQsV4=; b=JIp+3AqrL5qzmDRtyaqHxwIRi91Ia7GOmMj2BsGFa2ajsz/wvOyja/bokINqxmCRox TQtK0FMaKLvH59FghpmOLE4xJvkdeAfi71fC/eUFMbnKTFkOqmgrsrgILYlFrFibyEiR 835Z2qY5/CY/Mc/B4JiNS2yqFhL51NmnjVSrOr9zAWYkBoiMUt3tyIB9HQbVqhL9Pn0A yNzVUJ7TN4ht1zd29KiN10ft+9aIzM0IMEBiq7A7kE0Y46XiBN3UB7Eo84PCFYrp97vA 3Yxm4V62HV0TFCAwyk+hhOBQ1HYTOGz9y/AFi9NvHnqEJzZuhokmYyY5VCFoMKIpzhjT 0EGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eU39jTtE; 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 q21sor586402lfp.138.2021.06.09.03.02.03 for (Google Transport Security); Wed, 09 Jun 2021 03:02:03 -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=eU39jTtE; 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=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=nnUCWVUeulWnDzmOfqd/HgotqJOjtOQBbpoNssg8siEDAEDX+AunbQ02/d1uy4oZuv 7DLmTn9P8Jz1pZ2u6iLHyL/nWSx5qu2ufNAJ0xbcDBCRucKObA+DSB4vAU1toQQ2QYNb +SQvQNHsip3KACfY3MQGYrteN8KYI7HLWkSr7E64qVQuczjbF89vXfO67lj2Krz7CB5u l3JOZ01JT+QCIBZjO5QYaSuqlaGURLy8jpwe7J48jh0nlDPc6i/G30JdwF8XoVpnPyGd 07ey3JK/lgs/RxGSgdWKBMq+ovrvuH6MbXJhiJAn8RdErZHBdq+ILHJy3axZmHZNdqcv USxg== X-Gm-Message-State: AOAM5318SVOLn9ijLs3VexhKla2VMS9P83uzrM1wDeC7xy22IMDjkooI JR1CVuV3ZITn2KSQkRh0r8MJ2spX 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) 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 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 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(+) -- 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 =================================================