From patchwork Wed Oct 21 10:10:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 55368 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id E07962303B for ; Wed, 21 Oct 2015 10:13:18 +0000 (UTC) Received: by lbcao8 with SMTP id ao8sf15711787lbc.1 for ; Wed, 21 Oct 2015 03:13:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=WDNjQox+yuvF4xPdvto8Lnl8ezKrLbiL1+WWSxB7awc=; b=Gh4hErIt2L7yRuxT4skXwJPUz3XtEv7gqKrCx0NIGYCt+SNus7soyHwTMqZ/uJmJDX ZSEVZoImRCCHHoLBBH7yYrulf+iV8bMQ465XKzJ5JIbb/i0YUJOaGDCKdyxOM6ohJh9l Id/YO7KU4M2hOpU+zheYTNqQEIA3vEN8R+miuQhbkjHRsMPGhxdqE29DMtcvZGMPdcKb ixLonmrfTy9qMiHFYjGxxlrt9IEy0RC6RI9HD1IgUgJVyaIBD4aMAVVp319UTaaPPuXw popm1zlXVhXTFPDKQ6Dz4AiCWzzr9EP6ufYxn9dm2Uwuvsl5dlQ1n/gTeFag/oStv35r unAA== X-Gm-Message-State: ALoCoQm/57i3ZBK0j6JjqdUvvTC/MJM/Nrx94xGdKg5H1zpHJWWaKsl4R/DCloetAwySuWls/YUh X-Received: by 10.194.71.166 with SMTP id w6mr1948074wju.6.1445422397795; Wed, 21 Oct 2015 03:13:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.30.197 with SMTP id e188ls168346lfe.35.gmail; Wed, 21 Oct 2015 03:13:17 -0700 (PDT) X-Received: by 10.112.163.193 with SMTP id yk1mr4624069lbb.1.1445422397647; Wed, 21 Oct 2015 03:13:17 -0700 (PDT) Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id j184si1816184lfg.116.2015.10.21.03.13.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 03:13:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by lffz202 with SMTP id z202so18594044lff.3 for ; Wed, 21 Oct 2015 03:13:17 -0700 (PDT) X-Received: by 10.25.77.17 with SMTP id a17mr51896lfb.19.1445422397532; Wed, 21 Oct 2015 03:13:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2595950lbq; Wed, 21 Oct 2015 03:13:16 -0700 (PDT) X-Received: by 10.66.189.232 with SMTP id gl8mr9869894pac.52.1445422396483; Wed, 21 Oct 2015 03:13:16 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id rt6si12340507pbb.18.2015.10.21.03.13.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Oct 2015 03:13:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoqNE-0003Tf-Mw; Wed, 21 Oct 2015 10:12:00 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZoqMa-0002mn-G5 for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2015 10:11:22 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F0FB95A2; Wed, 21 Oct 2015 03:10:40 -0700 (PDT) Received: from e103737-lin.cambridge.arm.com (e103737-lin.cambridge.arm.com [10.1.207.150]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A8BD43F308; Wed, 21 Oct 2015 03:10:44 -0700 (PDT) From: Sudeep Holla To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org Subject: [PATCH 05/19] mmc: core/host: enable support for the standard "wakeup-source" property Date: Wed, 21 Oct 2015 11:10:02 +0100 Message-Id: <1445422216-29375-6-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1445422216-29375-1-git-send-email-sudeep.holla@arm.com> References: <1445422216-29375-1-git-send-email-sudeep.holla@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151021_031120_661291_DCA6592E X-CRM114-Status: GOOD ( 10.22 ) X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [217.140.101.70 listed in list.dnswl.org] 0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: Ulf Hansson , linux-mmc@vger.kernel.org, Adrian Hunter , Sudeep Holla MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sudeep.holla@arm.com 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.49 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Though the mmc core driver should/will continue to support the legacy "enable-sdio-wakeup" property to enable SDIO as the wakeup source, we need to add support for the new standard property "wakeup-source". This patch adds support for "wakeup-source" property in addition to the existing "enable-sdio-wakeup" property. Cc: Ulf Hansson Cc: Adrian Hunter Cc: linux-mmc@vger.kernel.org Signed-off-by: Sudeep Holla --- drivers/mmc/core/host.c | 3 ++- drivers/mmc/host/sdhci-pltfm.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index 5466f25f0281..85222bb56c73 100644 --- a/drivers/mmc/core/host.c +++ b/drivers/mmc/core/host.c @@ -513,7 +513,8 @@ int mmc_of_parse(struct mmc_host *host) host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE; if (of_property_read_bool(np, "keep-power-in-suspend")) host->pm_caps |= MMC_PM_KEEP_POWER; - if (of_property_read_bool(np, "enable-sdio-wakeup")) + if (of_property_read_bool(np, "wakeup-source") || + of_property_read_bool(np, "enable-sdio-wakeup")) /* legacy */ host->pm_caps |= MMC_PM_WAKE_SDIO_IRQ; if (of_property_read_bool(np, "mmc-ddr-1_8v")) host->caps |= MMC_CAP_1_8V_DDR; diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c index a207f5aaf62f..f00374bdafc9 100644 --- a/drivers/mmc/host/sdhci-pltfm.c +++ b/drivers/mmc/host/sdhci-pltfm.c @@ -108,7 +108,8 @@ void sdhci_get_of_property(struct platform_device *pdev) if (of_find_property(np, "keep-power-in-suspend", NULL)) host->mmc->pm_caps |= MMC_PM_KEEP_POWER; - if (of_find_property(np, "enable-sdio-wakeup", NULL)) + if (of_property_read_bool(np, "wakeup-source") || + of_property_read_bool(np, "enable-sdio-wakeup")) /* legacy */ host->mmc->pm_caps |= MMC_PM_WAKE_SDIO_IRQ; } #else