From patchwork Fri Dec 15 15:56:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 122117 Delivered-To: patches@linaro.org Received: by 10.140.22.227 with SMTP id 90csp648140qgn; Fri, 15 Dec 2017 07:56:48 -0800 (PST) X-Received: by 10.46.4.13 with SMTP id 13mr6151956lje.82.1513353408085; Fri, 15 Dec 2017 07:56:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513353408; cv=none; d=google.com; s=arc-20160816; b=obslcg1V0PjEFqDUFXpGadJotW0amTxHrEJfqDOK/pRlu2LpuG5qZgyqiGmV/SJT8i M3u7yfgd9zGwJmQNBdvwz5qcqg+SViguk4X6k69JIRwrPZ1n9Tz/dkEfg/6sMbxoNmml XeBet3GmcyxqlXw9vYSbymiZbACoBtTfYFDYcFemEm+fwQGgH0F5+Pti8UoVas1HV1E8 J+CmTmq8Dc1utSaN7T8dqtmDGk/sCa9bcgi/CkYPNfcFNLwqzkBDRQkIDvz9D0yczNpj kT5Svot7YlUYIrOlDfvNLqD4D211jeqoDcZFWQCxkCbNJeBjK2u0abCsTQ9uMQOZmDcn I9QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=jCY8bz7/xQ5L0RsBznCtaUtqbUhDUVEVK60+e6PwQos=; b=L4cZDav92bAuE/KeisVUIIIlqY5LvfbYdGU2WztFEgLNnzfmK3fHY/8grUhhua3kTk VbTSkgwtFpcowD8whqk64wsen1uH5FyetLGM6+MF5K4bI7+d8zIz3QQqZP+UCd8RhKP0 Qtj3pvRNg419qhn1D0QLMNpiI0y3XvWDtJY455TWH00avSMd1LK4rzhDY7wsA7XTJllg VnE39vUm0r2HSCZrUNAcAnotQXeo5YOHdy0sZ/J4ZW6tNX19s0HUrxIHdzBC5wKGl0Ib cuw1L9x2X6hCPByzldGWURWPCLKdjfDqDPAh3B2kfxhWb40CswKJCfSt7uSeqsSQt402 w/RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b1HYL5Ak; 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 x30sor1452067ljd.22.2017.12.15.07.56.47 for (Google Transport Security); Fri, 15 Dec 2017 07:56:48 -0800 (PST) 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=b1HYL5Ak; 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:in-reply-to:references; bh=jCY8bz7/xQ5L0RsBznCtaUtqbUhDUVEVK60+e6PwQos=; b=b1HYL5Akpsckb3u1FEyu3Yw3qc7KA25imC8hSa3TIr3FcHfCtkXJ+L61AFqv3fmdma 5LmNYnYxsJXNai9q/8JRKMsQph0rg0Whr5rZuT9dkBxFRk98GP/UKvQR6iqRDbsxN2vz SjHuHKuaddOrZnCp0M/Mz4z2CFHMr+i97n5dM= 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; bh=jCY8bz7/xQ5L0RsBznCtaUtqbUhDUVEVK60+e6PwQos=; b=kPWfnc1x+dJDywVzxoOEqJ81rBhY3nxsAF1hpfYBqoyTOr+DloRudkjZUD1tGnUQeq N8AIiGKbaE4H86njHGf31LZq4sZpuQA7Jw6n2A2MC5NOPEq4q+BcxV7LWSgTjoKJlk3v AtTOfVBXziiJYcbtNucFtkPNKMJF6+u1azjm3b3W6HxGDMD/06zePMFvj1NGJg8GLr5s Je5bHoqkyP0pv+b4VWPNug8IQiva4xUR3x/R/DoRXa8HlDhxvmwY80A9bttNJbaJklRY iKH2Ng5bzFhqGyznt/K9WImwaipu8jXBZYCIjmRFDuHWZKV+ckyKt3T/cOlTZ70uCMvj k3ng== X-Gm-Message-State: AKGB3mLs53Wz+OHmf2r+Iy7gPwU7ozv44oDdZt4llA8/FeCzxUXY0XE7 u4iZWLt8XgDZGjquM9hxq8PDlow/ X-Google-Smtp-Source: ACJfBotq41Ux29TXSbHVZJhdahqwTdd93aHUYokfEd/c8Jo1S6OtB+HCaqi9H7l/JOMuPiahairImw== X-Received: by 10.46.43.86 with SMTP id q83mr6490412lje.104.1513353407693; Fri, 15 Dec 2017 07:56:47 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-67.NA.cust.bahnhof.se. [158.174.22.67]) by smtp.gmail.com with ESMTPSA id y15sm1294216lje.10.2017.12.15.07.56.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Dec 2017 07:56:46 -0800 (PST) From: Ulf Hansson To: "Rafael J . Wysocki" , linux-pm@vger.kernel.org Cc: Kevin Hilman , Viresh Kumar , Geert Uytterhoeven , Simon Horman , Niklas Soderlund , Vincent Guittot , linux-renesas-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 3/3] PM / Domains: Take WAKEUP_PATH driver flag into account in genpd Date: Fri, 15 Dec 2017 16:56:31 +0100 Message-Id: <1513353391-30806-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513353391-30806-1-git-send-email-ulf.hansson@linaro.org> References: <1513353391-30806-1-git-send-email-ulf.hansson@linaro.org> In case the WAKEUP_PATH flag has been set in a later phase than from the ->suspend() callback, the PM core want set the ->power.wakeup_path status flag for the device. Therefore, let's be safe and check it explicitly. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index f9dcc98..32b4ba7 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1038,7 +1038,9 @@ static int genpd_finish_suspend(struct device *dev, bool poweroff) if (IS_ERR(genpd)) return -EINVAL; - if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd)) + if ((dev->power.wakeup_path || + dev_pm_test_driver_flags(dev, DPM_FLAG_WAKEUP_PATH)) && + genpd_is_active_wakeup(genpd)) return 0; if (poweroff) @@ -1093,7 +1095,9 @@ static int genpd_resume_noirq(struct device *dev) if (IS_ERR(genpd)) return -EINVAL; - if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd)) + if ((dev->power.wakeup_path || + dev_pm_test_driver_flags(dev, DPM_FLAG_WAKEUP_PATH)) && + genpd_is_active_wakeup(genpd)) return 0; genpd_lock(genpd);