From patchwork Fri Mar 13 15:43:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 45796 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DEC71214BF for ; Fri, 13 Mar 2015 15:44:39 +0000 (UTC) Received: by widex7 with SMTP id ex7sf4293253wid.2 for ; Fri, 13 Mar 2015 08:44:39 -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=oLDXWulNcHHG3YY2l2eL++V7+f7oOA3l3ZB4xSb73cU=; b=WwNylrDVUV1mjM5Ugqj38YovBpM6ULyDX3pGaO5osEslx6pZoa+Vte6lRR09IfK0so MyJlQAbchvZBhtKEEbkr3eOWxGn3/Tp4zEw6QlzqYafhXxBEnWyADSur3HQQJCKis5+L WdfbkxQDgA0U9ENKW8+zpTsX5QnqHXfysc2UPJGT4MUGStodD2j0nn1xC+z52NISUcgD TPxrAlW9iTPH5uxqql2XeoZl5wjTtvyQnDVBL71FL9aeWejIyWWT+hoRJu7/nbVFfDeK 1d2x6HTaSTJA8TTVsssYbMKNjFOpWAkpnkJ04iEVGshfpYx1ro3OAF3+VNnRheRzjibZ 6nxg== X-Gm-Message-State: ALoCoQlOm65eA2SJTk5A6w1HsH58B7uwjfDQy2BFhyJMTE9SQ8OYegAWR/iflj9phVX2ElAQWRdc X-Received: by 10.180.90.175 with SMTP id bx15mr4064218wib.3.1426261478890; Fri, 13 Mar 2015 08:44:38 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.137 with SMTP id z9ls396310laa.15.gmail; Fri, 13 Mar 2015 08:44:38 -0700 (PDT) X-Received: by 10.112.169.39 with SMTP id ab7mr42880800lbc.85.1426261478538; Fri, 13 Mar 2015 08:44:38 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id mi2si1628760lbc.167.2015.03.13.08.44.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Mar 2015 08:44:38 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbdu10 with SMTP id u10so23619062lbd.4 for ; Fri, 13 Mar 2015 08:44:38 -0700 (PDT) X-Received: by 10.152.5.194 with SMTP id u2mr44027936lau.88.1426261478452; Fri, 13 Mar 2015 08:44:38 -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.35.133 with SMTP id h5csp1000260lbj; Fri, 13 Mar 2015 08:44:38 -0700 (PDT) X-Received: by 10.112.92.198 with SMTP id co6mr15847306lbb.101.1426261463153; Fri, 13 Mar 2015 08:44:23 -0700 (PDT) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com. [209.85.215.52]) by mx.google.com with ESMTPS id qs6si1644613lbb.49.2015.03.13.08.44.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Mar 2015 08:44:23 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.215.52 as permitted sender) client-ip=209.85.215.52; Received: by labmn12 with SMTP id mn12so23557351lab.0 for ; Fri, 13 Mar 2015 08:44:23 -0700 (PDT) X-Received: by 10.112.146.129 with SMTP id tc1mr21867024lbb.27.1426261463009; Fri, 13 Mar 2015 08:44:23 -0700 (PDT) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id i9sm471248lbs.26.2015.03.13.08.44.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 13 Mar 2015 08:44:22 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Kevin Hilman , linux-pm@vger.kernel.org Cc: Geert Uytterhoeven , Dmitry Torokhov , Russell King , Greg Kroah-Hartman , Mark Brown , Wolfram Sang , linux-arm-kernel@lists.infradead.org, Ulf Hansson Subject: [PATCH 8/9] mmmc: core: Keep PM domain powered during ->probe() of SDIO func driver Date: Fri, 13 Mar 2015 16:43:48 +0100 Message-Id: <1426261429-31883-9-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1426261429-31883-1-git-send-email-ulf.hansson@linaro.org> References: <1426261429-31883-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.171 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 71357b8..0d89b4b 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -320,7 +320,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;