From patchwork Fri May 3 05:53:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Belisko Marek X-Patchwork-Id: 2515201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 9A0E73FCA5 for ; Fri, 3 May 2013 05:54:32 +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 1UY8wk-00082H-IB; Fri, 03 May 2013 05:54:18 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UY8wd-0008K6-J1; Fri, 03 May 2013 05:54:11 +0000 Received: from mail-ee0-f51.google.com ([74.125.83.51]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UY8wU-0008IN-Ok for linux-arm-kernel@lists.infradead.org; Fri, 03 May 2013 05:54:03 +0000 Received: by mail-ee0-f51.google.com with SMTP id c1so583890eek.38 for ; Thu, 02 May 2013 22:53:39 -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=q8toCw+K7dzAxGG9MvrYYkIbGHUIHSkh0x1yh4tDS/E=; b=DLwHzTD/SA5oKqMtpoQC+i2jt2IHXfk+dsMsPXqWu1F4Y4zLKEepnVqRXa84sMwgqA 04lNQgoafhnSv5mQow2FNXpIrc4aEyOPYBTW5tG6UNEDM+iVrVGoneDthXLo/pFzi5P/ uzLaH93Uj7e8U4pt21safrOVWvaCGc5Mxk0YiMkCLtwlgGE3uwyKtltgsYlarJgQ0O6w OevLb0/u1EAo2ETd31Qd+0Oiw6HfF5PRn599fl7DflJJsINalDJqAH2moS6VOkjj0gEt GfCujGO+GWT/Ot3uSeDXmMf0njVLlMJI8Zh4uwJk+tywh6Ovv6evOz2Ai+SIne28sf3U daJQ== X-Received: by 10.14.3.137 with SMTP id 9mr15962658eeh.0.1367560419510; Thu, 02 May 2013 22:53:39 -0700 (PDT) Received: from localhost.localdomain (81.89.61.168.vnet.sk. [81.89.61.168]) by mx.google.com with ESMTPSA id t9sm1085469eeo.11.2013.05.02.22.53.37 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 02 May 2013 22:53:38 -0700 (PDT) From: Marek Belisko To: mturquette@linaro.org Subject: [PATCH v2 2/2] clk: si5351: Set initial clkout rate when defined in platform data. Date: Fri, 3 May 2013 07:53:23 +0200 Message-Id: <1367560403-21685-2-git-send-email-marek.belisko@streamunlimited.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1367560403-21685-1-git-send-email-marek.belisko@streamunlimited.com> References: <1367560403-21685-1-git-send-email-marek.belisko@streamunlimited.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130503_015402_930235_3C432144 X-CRM114-Status: GOOD ( 10.93 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.83.51 listed in list.dnswl.org] 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 , vladimir.koutny@streamunlimited.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 Signed-off-by: Marek Belisko Acked-by: Sebastian Hesselbarth --- Changes v1->v2: - update commit message and comment to refer to platform data not DT 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..24f5536 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 initial clkout rate */ + 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,