From patchwork Thu Dec 12 16:07:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 3333181 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 647B5C0D4A for ; Thu, 12 Dec 2013 16:53:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9D632207CE for ; Thu, 12 Dec 2013 16:53:53 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 68D38207CC for ; Thu, 12 Dec 2013 16:53:48 +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 1Vr8pm-0002Ca-Qv; Thu, 12 Dec 2013 16:09:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr8p9-0001D0-2W; Thu, 12 Dec 2013 16:09:15 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vr8o7-00015x-14 for linux-arm-kernel@lists.infradead.org; Thu, 12 Dec 2013 16:08:12 +0000 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MXP008GTBGW2860@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Thu, 12 Dec 2013 16:07:44 +0000 (GMT) X-AuditID: cbfec7f4-b7f966d0000003d9-40-52a9df50fc89 Received: from eusync3.samsung.com ( [203.254.199.213]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 77.EC.00985.05FD9A25; Thu, 12 Dec 2013 16:07:44 +0000 (GMT) Received: from amdc1227.digital.local ([106.116.147.199]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0MXP00BIHBGQS260@eusync3.samsung.com>; Thu, 12 Dec 2013 16:07:44 +0000 (GMT) From: Tomasz Figa To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/8] clk: max77686: Provide .recalc_rate() operation Date: Thu, 12 Dec 2013 17:07:15 +0100 Message-id: <1386864441-19561-3-git-send-email-t.figa@samsung.com> X-Mailer: git-send-email 1.8.4.3 In-reply-to: <1386864441-19561-1-git-send-email-t.figa@samsung.com> References: <1386864441-19561-1-git-send-email-t.figa@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsVy+t/xq7oB91cGGVz7zGQx/8g5VouzTW/Y Le5/PcposenxNVaLGef3MVk8nXCRzeLkn15Gi9PdrBbrZ7xmceD0uHNtD5vHvJOBHpuX1Hv0 bVnF6PF5k1wAaxSXTUpqTmZZapG+XQJXxqkn+xkL2jgqni5eytzAeJuti5GDQ0LARGLhrKAu Rk4gU0ziwr31QGEuDiGBpYwS2771sEI4fUwS7a/nsoJUsQmoSXxueMQGYosIaEhM6XrMDlLE LLCGSaJ381RWkKnCAu4Sew+UgtSwCKhKPP14iQkkzCvgJPHzQibEMgWJzjX/GUFsTgFniRuH Z4PZQkAl2xZPYp/AyLuAkWEVo2hqaXJBcVJ6rqFecWJucWleul5yfu4mRkiAfdnBuPiY1SFG AQ5GJR7eFwdXBAmxJpYVV+YeYpTgYFYS4b23ZWWQEG9KYmVValF+fFFpTmrxIUYmDk6pBkat lN2H3X+d+B+2LKAyldsipsYuVaTw0MRJfzwlHRsX6s3b80JAdCXLhNztCp6fZ7q5lz5tfc4f Pj/9sk1b9sXg04cXask+2LJ26ssfLK/u/uvYxajMcnYTw7JFj5Y/FHC/epVfIvee6dE5Tgo/ Ss5vvR+RutfjkoXnd8PjMiyV+78V3Mm4fvKkEktxRqKhFnNRcSIAO/uAGw4CAAA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131212_110811_207302_092FD7EE X-CRM114-Status: UNSURE ( 8.08 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -6.9 (------) Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Mike Turquette , Samuel Ortiz , Sachin Kamat , Tomasz Figa , Kyungmin Park , Lee Jones 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 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 It is usually nice to know frequency of a clock, so this patch adds a .recalc_rate() callback returning rates of provided clocks. Signed-off-by: Tomasz Figa Acked-by: Kyungmin Park --- drivers/clk/clk-max77686.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/clk-max77686.c b/drivers/clk/clk-max77686.c index e39d463..e40ecdb 100644 --- a/drivers/clk/clk-max77686.c +++ b/drivers/clk/clk-max77686.c @@ -81,10 +81,17 @@ static int max77686_clk_is_prepared(struct clk_hw *hw) return val & max77686->mask; } +static unsigned long max77686_recalc_rate(struct clk_hw *hw, + unsigned long parent_rate) +{ + return 32768; +} + static struct clk_ops max77686_clk_ops = { .prepare = max77686_clk_prepare, .unprepare = max77686_clk_unprepare, .is_prepared = max77686_clk_is_prepared, + .recalc_rate = max77686_recalc_rate, }; static struct clk_init_data max77686_clks_init[MAX77686_CLKS_NUM] = {