From patchwork Wed Oct 16 13:16:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 176474 Delivered-To: patches@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp7157009ocf; Wed, 16 Oct 2019 06:16:28 -0700 (PDT) X-Received: by 2002:a2e:3919:: with SMTP id g25mr25431549lja.162.1571231788260; Wed, 16 Oct 2019 06:16:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571231788; cv=none; d=google.com; s=arc-20160816; b=JVyAwSMQkWZHVzvTEjtwN1SZIQ8Y9x0OWMo9c665OTbIJ2MxqIxmzGCEioY2gI01Ju 23r7R8izk/OyejVweZOeNoG15h1N5gF5j7CEoiYY71x0tuGzJ8R7Xnq8SG8+N+24QqpH CNNzGePoU5pC5h/zLdm/Ym57wnX5te2WM0phGcyC9vDi+KYMxNpD9xFxc20cmF2wPCbP ycda0xnO9+PsHfXVL3AsyzIb5E8CN9zIpuIW7CspwKTnd6KqS/KoXouWQJQhY/uxLEan 9nYx6IVN6TyGWKNAziAdP4cZm0WbeW3sYiRMV7kStF8vQFJufBfT/lFnmZ69cRiyZNyG tmXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature; bh=zwcPtwWQF6liVN+zYzdJWAttHhAVvs66PzaVZNVn+cw=; b=Wq7ydh9PyW/tA5YownGGgUbdpyPFqW1tD7/oFpPCyP9qqoog6Cv7yGFzc/ApyYaNMk HW6Nmr/x8k9Shes56X+ies2gIv7XQGGWY2Gv159LpipNzQuYsjKnaitzJXdRNK4AQXht FDhk+WM6f9Ru/tH/AEHkI+g6IUDe/uR4nJqy4SwxjxmM/ZFT57O06x/odY2SrCoYt0ED ie/hbsAGZlKiAcNCRXhL7JYkFfnPYeROPCzp8esyVnv0+dN9pD8FidUYNVX99Ejz96Gc pN0wwMECxn/VpFrqOI9XvZ+eF+gsU66zTac2RLNdc6y6mNzVcxcY1ouRFBUFhVrCCDpE c65g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dvr+4U2i; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 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-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id d20sor13996213ljo.18.2019.10.16.06.16.28 for (Google Transport Security); Wed, 16 Oct 2019 06:16:28 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Dvr+4U2i; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 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; bh=zwcPtwWQF6liVN+zYzdJWAttHhAVvs66PzaVZNVn+cw=; b=Dvr+4U2iGye8PwQvS9auZPByIhigKBPwgqTMaVL25rrzhMnxujo74IWXzkz9PvOnrT kvZST1KOBOXRVVvfcdQfLqr4zgVA0OGd397GOX6LE93ttKv7Y8TCpf70xk7yCpMUaLOB tyUFO6tUmWi9i1drghLKs2arwRbpV6HjcZdKmiq1v0zn2h/sB9RLnC5B/SH8Vr0SYG9V p2ziDUB0e3n+wReOMDubHRKJlLSMPz6HZWVaP1Y6UEDLbTKpj45/OkT7GTby3zlilY2j I2lGoV5HOVaH+EioMIxr5e5saj2W1f1kPMl566SBDeUCbu44Cel69n1pIdUOJVBOfY/x Sl/g== 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; bh=zwcPtwWQF6liVN+zYzdJWAttHhAVvs66PzaVZNVn+cw=; b=txh4x5F+RoGebpHvL5QXKahxCFpNsDNssWv3gF8rnJulRWAn8ZPkFf6fnFc0Nn3VWO 41v0+b+JQ8daIyw4LlzoTln9fK6hTdmNodvzXOcqLftv7zwkMAAPSFSzX4rNV5lMulwP 0UgtkiqjV3wq6E2gdEoPNyFWPxBtYch1OGbduS2ExsvVvh3n0GzZXabMgdy5KJ3oP0br pjaiMViAFwyeoIyVdIO8Q6p0Qxafv8cSsMfl/vmDOeA0b+bMr0keN82n0LXphpbm20Fx JKK+2RY2/TY1Q4h2kzON4mQntFcgOXBYmv3xHKZCtl36+S7fGkLD1erHFPF02ftk75Pa ZfEQ== X-Gm-Message-State: APjAAAXg4zwvusHqAN3EIR3r3BqgNB20JX5TTz49uQWOH0L0aP+xnG+T ChIp+tZ4NpdHB+l9piKY9ZE/VOn+ X-Google-Smtp-Source: APXvYqyoH9MQbW8BVPPDIOi4iBgbLqiYtqm6XR1J9gGq8SXdHH51QB1ilbfdS+SKrh56ecUB0gzTKw== X-Received: by 2002:a2e:9ec2:: with SMTP id h2mr22570726ljk.85.1571231787847; Wed, 16 Oct 2019 06:16:27 -0700 (PDT) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id q19sm10215746lfj.9.2019.10.16.06.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Oct 2019 06:16:27 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Geert Uytterhoeven , Wolfram Sang , Niklas Soderlund , Ulf Hansson , Kevin Hilman Subject: [PATCH 2/3] PM / Domains: Implement the ->start() callback for genpd Date: Wed, 16 Oct 2019 15:16:24 +0200 Message-Id: <20191016131624.15832-1-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 To allow a subsystem/driver to explicitly start its device from genpd's point view, let's implement the ->start() callback in the struct dev_pm_domain that corresponds to the genpd. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.17.1 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index cc85e87eaf05..2adf0661fa3e 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -634,6 +634,13 @@ static int genpd_power_on(struct generic_pm_domain *genpd, unsigned int depth) return ret; } +static int genpd_dev_pm_start(struct device *dev) +{ + struct generic_pm_domain *genpd = dev_to_genpd(dev); + + return genpd_start_dev(genpd, dev); +} + static int genpd_dev_pm_qos_notifier(struct notifier_block *nb, unsigned long val, void *ptr) { @@ -1805,6 +1812,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd, genpd->domain.ops.poweroff_noirq = genpd_poweroff_noirq; genpd->domain.ops.restore_noirq = genpd_restore_noirq; genpd->domain.ops.complete = genpd_complete; + genpd->domain.start = genpd_dev_pm_start; if (genpd->flags & GENPD_FLAG_PM_CLK) { genpd->dev_ops.stop = pm_clk_suspend;