Message ID | 1413208930-26019-4-git-send-email-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBDF57NG2XIHRB7NW56QQKGQEXFBI74A@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5DF4A2039B for <linaro@patches.linaro.org>; Mon, 13 Oct 2014 14:02:38 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id hi2sf2875116wib.9 for <linaro@patches.linaro.org>; Mon, 13 Oct 2014 07:02:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=o3j24SLU6UiBqvzb/byVRSBygeTuzk9IL6WP/7Kn414=; b=IRezRTq2zHtNt5OBVDIZzVOiTQ+aIp0/35JI8BfuwPI4OWOMFjmoJV4B4TMoXaMWN6 AYommsqUbAvgwOnYHLE6U2b9gIPPfYRVYEWEo0HciC7qVmnnI1/BJZdIBaanZTWw/1ix LADDw2C3PdSgXDIeu1r4/wR7c7rRLBFRKtxEJZ+z4nP9Q1xdiNpySCbm4N0u7cQ+0sSh LP4qc0rGBG2ImG3nqV3slZcF2XHWEQrYQDillirIzYPIS271HMdYqdSWkPBs4p8ee+Vi RVCKcUTIPwEkjZgFZeGfIilXsXnk1ze+DZw6ZUfvrTxCj4jRReQ7vrjVJFCLOd1yjWPH rryw== X-Gm-Message-State: ALoCoQkJDCq30t1sv+bAbCW4r9LP6iDuFngfoH8M0vgpoDNCzzQAkeIbKamjW9M0FZFACCegqVFU X-Received: by 10.180.19.198 with SMTP id h6mr191548wie.5.1413208957523; Mon, 13 Oct 2014 07:02:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.38 with SMTP id p6ls469879lap.72.gmail; Mon, 13 Oct 2014 07:02:37 -0700 (PDT) X-Received: by 10.152.9.2 with SMTP id v2mr24623351laa.36.1413208957372; Mon, 13 Oct 2014 07:02:37 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com [209.85.215.47]) by mx.google.com with ESMTPS id k10si13862407lbp.126.2014.10.13.07.02.37 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 07:02:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id pv20so6635241lab.6 for <patchwork-forward@linaro.org>; Mon, 13 Oct 2014 07:02:37 -0700 (PDT) X-Received: by 10.112.62.200 with SMTP id a8mr24176034lbs.34.1413208957294; Mon, 13 Oct 2014 07:02:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.84.229 with SMTP id c5csp220110lbz; Mon, 13 Oct 2014 07:02:36 -0700 (PDT) X-Received: by 10.194.78.76 with SMTP id z12mr20976703wjw.24.1413208955640; Mon, 13 Oct 2014 07:02:35 -0700 (PDT) Received: from mail-wg0-f48.google.com (mail-wg0-f48.google.com [74.125.82.48]) by mx.google.com with ESMTPS id i9si9582194wib.82.2014.10.13.07.02.35 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 07:02:35 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 74.125.82.48 as permitted sender) client-ip=74.125.82.48; Received: by mail-wg0-f48.google.com with SMTP id k14so8643429wgh.19 for <patches@linaro.org>; Mon, 13 Oct 2014 07:02:35 -0700 (PDT) X-Received: by 10.180.188.102 with SMTP id fz6mr870332wic.61.1413208955420; Mon, 13 Oct 2014 07:02:35 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id fq1sm1533474wib.12.2014.10.13.07.02.33 for <multiple recipients> (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Oct 2014 07:02:34 -0700 (PDT) From: Ulf Hansson <ulf.hansson@linaro.org> To: "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>, linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven <geert+renesas@glider.be>, Kevin Hilman <khilman@linaro.org>, Alan Stern <stern@rowland.harvard.edu>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Tomasz Figa <tomasz.figa@gmail.com>, Simon Horman <horms@verge.net.au>, Magnus Damm <magnus.damm@gmail.com>, Ben Dooks <ben-linux@fluff.org>, Kukjin Kim <kgene.kim@samsung.com>, Philipp Zabel <philipp.zabel@gmail.com>, Mark Brown <broonie@kernel.org>, Wolfram Sang <wsa@the-dreams.de>, Russell King <linux@arm.linux.org.uk>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Jack Dai <jack.dai@rock-chips.com>, Jinkun Hong <jinkun.hong@rock-chips.com>, Aaron Lu <aaron.lu@intel.com>, Sylwester Nawrocki <s.nawrocki@samsung.com>, Ulf Hansson <ulf.hansson@linaro.org> Subject: [PATCH v3 3/9] amba: Keep PM domain powered during ->probe() Date: Mon, 13 Oct 2014 16:02:04 +0200 Message-Id: <1413208930-26019-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413208930-26019-1-git-send-email-ulf.hansson@linaro.org> References: <1413208930-26019-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> |
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 47bbdc1..a8a8e13 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -187,8 +187,15 @@ static int amba_probe(struct device *dev) if (ret == -EPROBE_DEFER) break; + ret = dev_pm_domain_get(dev->pm_domain); + if (ret) { + dev_pm_domain_detach(dev, true); + break; + } + ret = amba_get_enable_pclk(pcdev); if (ret) { + dev_pm_domain_put(dev->pm_domain); dev_pm_domain_detach(dev, true); break; } @@ -198,6 +205,7 @@ static int amba_probe(struct device *dev) pm_runtime_enable(dev); ret = pcdrv->probe(pcdev, id); + dev_pm_domain_put(dev->pm_domain); if (ret == 0) break;
To sucessfully probe some devices their corresponding PM domains may need to be powered. Use the dev_pm_domain_get|put() APIs, to control the behavior of the PM domain. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/amba/bus.c | 8 ++++++++ 1 file changed, 8 insertions(+)