From patchwork Tue Apr 23 06:22:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Belisko Marek X-Patchwork-Id: 2475581 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 66441DF2E5 for ; Tue, 23 Apr 2013 06:23:43 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUWdW-0005gD-GM; Tue, 23 Apr 2013 06:23:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUWdR-0000L8-A1; Tue, 23 Apr 2013 06:23:25 +0000 Received: from mail-ea0-x22c.google.com ([2a00:1450:4013:c01::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UUWdG-0000Jj-3A for linux-arm-kernel@lists.infradead.org; Tue, 23 Apr 2013 06:23:15 +0000 Received: by mail-ea0-f172.google.com with SMTP id g14so79967eak.3 for ; Mon, 22 Apr 2013 23:23:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=2SJegc+rM24d2q0UNsxFZAUPfWQtrxbZmuvqVEpG7ms=; b=BmVGC5/CLyEMg5mXxqP2axvMRx7S2TIHUS4jiVRPjboJ32rvNGFO/o5RG4+iB+nrT0 gmJ10rurLjhzhMSAzLv+bEyWN7C6RXtuSH8vugTK7vH8bO1wY1Qz+CJNmC0T/aaI2M9V qkX3qV0YBm6JoSPVupneOQbroLCs2K2kEfYPlNFYkiicG77hwAwk2SGvEFx0ll+7Xh27 YFAFEVauepVS2tqmmNZ7V1hCWHgOfpaBHsY2j106cz/avckFDyJtcbXGPvPi9vdy4D/G n6S2a6FT+5XjhnSSiCWekriOZu4iFnVYBBWabbeD+Cjx1HJx+W53JBRfGgZ5iocCrygo 03Yg== X-Received: by 10.14.89.69 with SMTP id b45mr2790829eef.10.1366698192439; Mon, 22 Apr 2013 23:23:12 -0700 (PDT) Received: from localhost.localdomain (81.89.61.168.vnet.sk. [81.89.61.168]) by mx.google.com with ESMTPS id n48sm44713128eeg.12.2013.04.22.23.23.10 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 22 Apr 2013 23:23:11 -0700 (PDT) From: Marek Belisko To: mturquette@linaro.org Subject: [PATCH 2/2] clk: si5351: Apply rate when clock-frequency is defined in devicetree. Date: Tue, 23 Apr 2013 08:22:50 +0200 Message-Id: <1366698170-31346-2-git-send-email-marek.belisko@streamunlimited.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1366698170-31346-1-git-send-email-marek.belisko@streamunlimited.com> References: <1366698170-31346-1-git-send-email-marek.belisko@streamunlimited.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130423_022314_335700_4E3482D4 X-CRM114-Status: GOOD ( 11.57 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (marek.belisko[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Marek Belisko , sebastian.hesselbarth@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, zonque@gmail.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org clock-frequency property from devicetree was read but never used. Apply defined rate when clock is registered. Signed-off-by: Marek Belisko Acked-by: Sebastian Hesselbarth --- drivers/clk/clk-si5351.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c index cf39e53..8323c31 100644 --- a/drivers/clk/clk-si5351.c +++ b/drivers/clk/clk-si5351.c @@ -1477,6 +1477,16 @@ static int si5351_i2c_probe(struct i2c_client *client, return -EINVAL; } drvdata->onecell.clks[n] = clk; + + /* set rate when defined in devicetree */ + if (pdata->clkout[n].rate != 0) { + int ret; + ret = clk_set_rate(clk, pdata->clkout[n].rate); + if (ret != 0) { + dev_err(&client->dev, "Cannot set rate : %d\n", + ret); + } + } } ret = of_clk_add_provider(client->dev.of_node, of_clk_src_onecell_get,