From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755329AbbJ1FhE (ORCPT ); Wed, 28 Oct 2015 01:37:04 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:8277 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752051AbbJ1FhB (ORCPT ); Wed, 28 Oct 2015 01:37:01 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-b1-56305efa6115 Subject: Re: [PATCH v3 4/5] clk: s2mps15: Add support for S2MPS15 clocks To: Alim Akhtar , lee.jones@linaro.org, broonie@kernel.org References: <1445863883-5187-1-git-send-email-alim.akhtar@samsung.com> <1445863883-5187-5-git-send-email-alim.akhtar@samsung.com> <5630243E.1080608@samsung.com> <5630503A.3070404@samsung.com> <5630554E.8070301@samsung.com> Cc: mturquette@baylibre.com, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org From: Krzysztof Kozlowski Message-id: <56305EF5.1080709@samsung.com> Date: Wed, 28 Oct 2015 14:36:53 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-version: 1.0 In-reply-to: <5630554E.8070301@samsung.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsVy+t/xa7q/4gzCDH41KVg8mLeNzWLqwyds Fq9fGFrc/3qU0eJjzz1Wi8u75rBZzDi/j8ni4ilXi/2dHYwOnB7vb7Sye+yZeJLNY9OqTjaP O9f2sHn0bVnF6PF5k1wAWxSXTUpqTmZZapG+XQJXxp1Va9kLvshV9G/dzNjAuECii5GDQ0LA ROLoxuguRk4gU0ziwr31bF2MXBxCAksZJZ4vaGUGSQgJfGGU+HjPGsQWFvCQ2HGkgQnEFhEI lZgx/wEzRMMTRomN2xeBOcwC0xkl7sx9yAJSxSZgLLF5+RI2EJtXQEti9to2sKksAqoS8xbN BbNFBSIkJk5oYIWoEZT4MfkeWC+ngLbEza7zbCCXMgvoSdy/qAUSZhaQl9i85i3zBEaBWUg6 ZiFUzUJStYCReRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSPB/2cG4+JjVIUYBDkYlHl6D Cr0wIdbEsuLK3EOMEhzMSiK8NYIGYUK8KYmVValF+fFFpTmpxYcYpTlYlMR55+56HyIkkJ5Y kpqdmlqQWgSTZeLglGpgzBJku/Essth3atTdKQUGPEX3Lh4/OEmvf/3Sw4JR9qq/JLrNX3b+ yIi+5VzGduXfau4+ntv+j3qFXVqzwzNtdyw6zHlULzBNZcXUQ4HvvbebcUVFbrCSXP7vv8/+ yjd/zrAYMjFdPy/nLf4m7iWvy2kFcTaPy42V046vjVbfpP4h8Nc+GT0DJZbijERDLeai4kQA RTgHOnoCAAA= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28.10.2015 13:55, Alim Akhtar wrote: > > > On 10/28/2015 10:04 AM, Krzysztof Kozlowski wrote: >> On 28.10.2015 10:26, Krzysztof Kozlowski wrote: >>> On 26.10.2015 21:51, Alim Akhtar wrote: >>>> 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; >>> >>> Another question (after looking at RTC driver): >>> Is this the same register address as S2MPS14? >> >> I found the answer - this is the same address as in S2MPS13 and S2MPS14: >> 0xc. The S2MPS14 has only two clocks though but S2MPS13 has three. >> Again, as in RTC, you should re-use existing support. >> >> It looks there is no need for this patch at all. >> > Yes, checked that, rtc looks same to s2mps14 and clk looks same as > s2mps13{ not s2mps11}, because of the RTC_BUF address changes. > Will drop patch 4 and 5 and use the existing names where applicable. Thanks! > I think I don't have to change the binding or Kconfig changes? I think you don't have to. Only the main MFD driver will be updated with respective child driver names and compatible. Best regards, Krzysztof