From patchwork Fri Jan 8 09:59:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Fuzzey X-Patchwork-Id: 7983661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CCD5E9F6FA for ; Fri, 8 Jan 2016 10:01:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1309820107 for ; Fri, 8 Jan 2016 10:01:25 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E019320103 for ; Fri, 8 Jan 2016 10:01:23 +0000 (UTC) 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 1aHTpe-0002ur-LJ; Fri, 08 Jan 2016 09:59:42 +0000 Received: from ip83.parkeon.com ([213.152.31.83] helo=mta2.parkeon.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aHTpc-0002te-5F for linux-arm-kernel@lists.infradead.org; Fri, 08 Jan 2016 09:59:40 +0000 Received: from time001.besancon.parkeon.com ([10.32.16.23] helo=mail.besancon.parkeon.com) by mta2.parkeon.com with esmtp (Exim 4.82) (envelope-from ) id 1aHTpF-0005in-B0; Fri, 08 Jan 2016 10:59:17 +0100 Received: from [10.32.51.9] (port=51680 helo=[127.0.0.1]) by mail.besancon.parkeon.com with esmtp (Exim 4.71) (envelope-from ) id 1aHTpF-0003oO-9y; Fri, 08 Jan 2016 10:59:17 +0100 Subject: [PATCH] mmc: pwrseq_simple: Support assigned-clocks To: Ulf Hansson , linux-mmc@vger.kernel.org From: Martin Fuzzey Date: Fri, 08 Jan 2016 10:59:17 +0100 Message-ID: <20160108095917.32335.11094.stgit@localhost> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Spam-Score: -2.0 (--) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160108_015940_378761_30A06949 X-CRM114-Status: UNSURE ( 8.02 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) 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: linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The clock subsystem now allows clock rates and parents to be configured in the device tree. This requires calling of_clk_set_defaults() which is done automatically for platform, i2c, spi devices. Since pwrseq_simple does not fit into those catagories we must do it ourself. With this patch the standard assigned-clocks, assigned-clock-rates, assigned-clock-parents DT properties to be used in pwrseq_simple nodes. Signed-off-by: Martin Fuzzey --- drivers/mmc/core/pwrseq_simple.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mmc/core/pwrseq_simple.c b/drivers/mmc/core/pwrseq_simple.c index 4d2962b..fd8f38e 100644 --- a/drivers/mmc/core/pwrseq_simple.c +++ b/drivers/mmc/core/pwrseq_simple.c @@ -8,6 +8,7 @@ * Simple MMC power sequence management */ #include +#include #include #include #include @@ -108,6 +109,10 @@ struct mmc_pwrseq *mmc_pwrseq_simple_alloc(struct mmc_host *host, if (!pwrseq) return ERR_PTR(-ENOMEM); + ret = of_clk_set_defaults(dev->of_node, false); + if (ret) + goto free; + pwrseq->ext_clk = clk_get(dev, "ext_clock"); if (IS_ERR(pwrseq->ext_clk) && PTR_ERR(pwrseq->ext_clk) != -ENOENT) {