From patchwork Mon Oct 26 10:36:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alim Akhtar X-Patchwork-Id: 7486941 Return-Path: X-Original-To: patchwork-linux-samsung-soc@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 905359F37F for ; Mon, 26 Oct 2015 10:48:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FD59207D4 for ; Mon, 26 Oct 2015 10:48:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A30752077B for ; Mon, 26 Oct 2015 10:48:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753768AbbJZKrz (ORCPT ); Mon, 26 Oct 2015 06:47:55 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:33173 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753586AbbJZKrx (ORCPT ); Mon, 26 Oct 2015 06:47:53 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout3.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NWT02WFFPZRPLA0@mailout3.samsung.com>; Mon, 26 Oct 2015 19:47:51 +0900 (KST) Received: from epcpsbgm2new.samsung.com ( [172.20.52.122]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 37.FD.05385.7D40E265; Mon, 26 Oct 2015 19:47:51 +0900 (KST) X-AuditID: cbfee691-f79d66d000001509-22-562e04d7cb0c Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 7E.46.18629.7D40E265; Mon, 26 Oct 2015 19:47:51 +0900 (KST) Received: from exypnos.sisodomain.com ([107.108.73.28]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NWT006MIPVU1230@mmp1.samsung.com>; Mon, 26 Oct 2015 19:47:51 +0900 (KST) From: Alim Akhtar To: lee.jones@linaro.org, broonie@kernel.org Cc: k.kozlowski@samsung.com, mturquette@baylibre.com, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/5] clk: s2mps15: Add support for S2MPS15 clocks Date: Mon, 26 Oct 2015 16:06:42 +0530 Message-id: <1445855803-26973-5-git-send-email-alim.akhtar@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1445855803-26973-1-git-send-email-alim.akhtar@samsung.com> References: <1445855803-26973-1-git-send-email-alim.akhtar@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrELMWRmVeSWpSXmKPExsWyRsSkSvc6i16Ywdu3shZTHz5hs3j9wtDi /tejjBYfe+6xWlzeNYfNYsb5fUwWF0+5Wuzv7GB04PB4f6OV3WPPxJNsHptWdbJ53Lm2h82j b8sqRo/Pm+QC2KK4bFJSczLLUov07RK4MtYfms9ScFW04v/Js6wNjJ8Fuxg5OSQETCTWrVjJ CGGLSVy4t54NxBYSWMEo8WWJEEzNsu/fgGq4gOJLGSVOz73CDOH8ZJR4teMSWAebgLbE3elb mLoYOThEBHQkrt9IB6lhFtjAKLHi7x12kBphAReJa3tXsoPUsAioSrR8VgUJ8wq4SzQdns4G sUxRovvZBDCbU8BD4uTzf0wQB7lLNK6YB3aEhMA6donm1u9gV7MICEh8m3yIBWSmhICsxKYD zBBzJCUOrrjBMoFReAEjwypG0dSC5ILipPQiU73ixNzi0rx0veT83E2MwKA//e/ZxB2M9w9Y H2IU4GBU4uF9waMbJsSaWFZcmXuI0RRow0RmKdHkfGBs5ZXEGxqbGV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64nyAOeNGUDHjsRPz8jPi/AI2CRXITzkWvE7k/yNnOZeJ3070M55QWB6kxFKckWio xVxUnAgAxaBEMMMCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 S2MPS15 PMIC has three 32k buffered clocks outputs. This patch adds supports for the same to the s2mps11 clock driver. Signed-off-by: Alim Akhtar --- drivers/clk/Kconfig | 5 +++-- drivers/clk/clk-s2mps11.c | 24 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index a1fa61159179..037a314b5d76 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -120,9 +120,10 @@ config COMMON_CLK_S2MPS11 tristate "Clock driver for S2MPS1X/S5M8767 MFD" depends on MFD_SEC_CORE ---help--- - This driver supports S2MPS11/S2MPS14/S5M8767 crystal oscillator + This driver supports S2MPS1X/S5M8767 crystal oscillator clock. These multi-function devices have two (S2MPS14) or three - (S2MPS11, S5M8767) fixed-rate oscillators, clocked at 32KHz each. + (S2MPS11/S2MPS13/S2MPS15/S5M8767) fixed-rate oscillators, + clocked at 32KHz each. config CLK_TWL6040 tristate "External McPDM functional clock from twl6040" diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c index d266299dfdb1..455500dca653 100644 --- a/drivers/clk/clk-s2mps11.c +++ b/drivers/clk/clk-s2mps11.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -148,6 +149,24 @@ static struct clk_init_data s2mps14_clks_init[S2MPS11_CLKS_NUM] = { }, }; +static struct clk_init_data s2mps15_clks_init[S2MPS11_CLKS_NUM] = { + [S2MPS11_CLK_AP] = { + .name = "s2mps15_ap", + .ops = &s2mps11_clk_ops, + .flags = CLK_IS_ROOT, + }, + [S2MPS11_CLK_CP] = { + .name = "s2mps15_cp", + .ops = &s2mps11_clk_ops, + .flags = CLK_IS_ROOT, + }, + [S2MPS11_CLK_BT] = { + .name = "s2mps15_bt", + .ops = &s2mps11_clk_ops, + .flags = CLK_IS_ROOT, + }, +}; + static struct device_node *s2mps11_clk_parse_dt(struct platform_device *pdev, struct clk_init_data *clks_init) { @@ -207,6 +226,10 @@ static int s2mps11_clk_probe(struct platform_device *pdev) s2mps11_reg = S2MPS14_REG_RTCCTRL; clks_init = s2mps14_clks_init; break; + case S2MPS15X: + s2mps11_reg = S2MPS15_REG_RTC_BUF; + clks_init = s2mps15_clks_init; + break; case S5M8767X: s2mps11_reg = S5M8767_REG_CTRL1; clks_init = s2mps11_clks_init; @@ -292,6 +315,7 @@ static const struct platform_device_id s2mps11_clk_id[] = { { "s2mps11-clk", S2MPS11X}, { "s2mps13-clk", S2MPS13X}, { "s2mps14-clk", S2MPS14X}, + { "s2mps15-clk", S2MPS15X}, { "s5m8767-clk", S5M8767X}, { }, };