From patchwork Mon Oct 13 14:02:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 38666 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D5DCE2039B for ; Mon, 13 Oct 2014 14:02:52 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id m15sf4168086wgh.7 for ; Mon, 13 Oct 2014 07:02:52 -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=smff/u15brtOK2tNGbN18XvxLrjQXNAVKhEBM1siEq4=; b=UIC8hKF6HfCXLeriP5sDnQkTg9qs3aTBxcNME6KZAaQRd6G7H8Pk/W6Xk5trfx0C9S I09RSaUgS/O1zNrzWWT0ei7+uuhs/K6JAsqiuGH6xl4ImxtJCt38SQ9UHdIwX/91pXXc U7eG9wa7pL0Ya40JbuId/eH3b5sJOlSC+Vy84rMwTlsL9TFeDrP6wFIoTy83bghITnYK VljpkoSOPQLvWe4YMuTqqQN8Igh/OBn84oGQWKm+GRajKcGDy1/jM0dom1ursnfSNHtb ayXzCuX+Elt4k2uiE/87R0aJRLRwgGum/yAbcg1WPmAX6531pFTL9B050d6xE4tgfgPm zG1Q== X-Gm-Message-State: ALoCoQnrY3UO2/DVms7sxRuGN9vEVRXUhd/vazAXFGS5bFk4ej44GDZun+FkySgeAYtAOSQnmVnE X-Received: by 10.112.74.80 with SMTP id r16mr8987lbv.21.1413208971978; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.44.169 with SMTP id f9ls470067lam.11.gmail; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) X-Received: by 10.112.161.135 with SMTP id xs7mr24133848lbb.13.1413208971809; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx.google.com with ESMTPS id kr10si22356785lac.72.2014.10.13.07.02.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 07:02:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id 10so6563418lbg.18 for ; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) X-Received: by 10.152.22.42 with SMTP id a10mr24446754laf.56.1413208971717; Mon, 13 Oct 2014 07:02:51 -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 c5csp220173lbz; Mon, 13 Oct 2014 07:02:51 -0700 (PDT) X-Received: by 10.194.184.111 with SMTP id et15mr21712262wjc.14.1413208967483; Mon, 13 Oct 2014 07:02:47 -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 g2si17858219wjb.15.2014.10.13.07.02.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 Oct 2014 07:02:47 -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 k14so8663741wgh.31 for ; Mon, 13 Oct 2014 07:02:47 -0700 (PDT) X-Received: by 10.180.8.165 with SMTP id s5mr1106167wia.4.1413208967206; Mon, 13 Oct 2014 07:02:47 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id fq1sm1533474wib.12.2014.10.13.07.02.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Oct 2014 07:02:46 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Geert Uytterhoeven , Kevin Hilman , Alan Stern , Greg Kroah-Hartman , Tomasz Figa , Simon Horman , Magnus Damm , Ben Dooks , Kukjin Kim , Philipp Zabel , Mark Brown , Wolfram Sang , Russell King , Dmitry Torokhov , Jack Dai , Jinkun Hong , Aaron Lu , Sylwester Nawrocki , Ulf Hansson Subject: [PATCH v3 8/9] mmmc: core: Keep PM domain powered during ->probe() of SDIO func driver Date: Mon, 13 Oct 2014 16:02:09 +0200 Message-Id: <1413208930-26019-9-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.217.173 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: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- drivers/mmc/core/sdio_bus.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index ba97779..83c8836 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -318,7 +318,14 @@ int sdio_add_func(struct sdio_func *func) if (ret) return ret; + ret = dev_pm_domain_get(func->dev.pm_domain); + if (ret) { + dev_pm_domain_detach(&func->dev, false); + return ret; + } + ret = device_add(&func->dev); + dev_pm_domain_put(func->dev.pm_domain); if (ret) { dev_pm_domain_detach(&func->dev, false); return ret;