From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753550AbbJ0FiF (ORCPT ); Tue, 27 Oct 2015 01:38:05 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:45197 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752080AbbJ0FiB (ORCPT ); Tue, 27 Oct 2015 01:38:01 -0400 X-AuditID: cbfee691-f79d66d000001509-1f-562f0db79384 Message-id: <562F0B7C.9080307@samsung.com> Date: Tue, 27 Oct 2015 10:58:28 +0530 From: Alim Akhtar User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-version: 1.0 To: Lee Jones Cc: broonie@kernel.org, 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, Thomas Abraham Subject: Re: [PATCH v2 2/5] mfd: sec: Add support for S2MPS15 PMIC References: <1445855803-26973-1-git-send-email-alim.akhtar@samsung.com> <1445855803-26973-3-git-send-email-alim.akhtar@samsung.com> <20151026110611.GH597@x1> <562E1F84.2000105@samsung.com> <20151026142930.GJ597@x1> In-reply-to: <20151026142930.GJ597@x1> Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrPIsWRmVeSWpSXmKPExsWyRsSkVnc7r36YwcJ2LYupD5+wWbx+YWhx /+tRRouPPfdYLS7vmsNmMeP8PiaLi6dcLfZ3djBadCxjdOD0eH+jld1jz8STbB6bVnWyedy5 tofNo2/LKkaPz5vkAtiiuGxSUnMyy1KL9O0SuDK+/HQvOC1e8f/kWcYGxhnCXYycHBICJhKX G3+wQdhiEhfurQeyuTiEBFYwShyf+JYJpqh3/3MWiMQsRonL35YyQzgPGCWWvp0M1s4roCXx asJDMJtFQFX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BM4lHL OmYIW15i85q3zBMYgc5E2DELSdksJGULGJlXMUqkFiQXFCel5xrlpZbrFSfmFpfmpesl5+du YgTH/DPpHYyHd7kfYhTgYFTi4TWo0AsTYk0sK67MPcQowcGsJMKb/xMoxJuSWFmVWpQfX1Sa k1p8iNEUGAgTmaVEk/OB6SivJN7Q2MTc1NjU0sTCxMxSSZz3QoZGmJBAemJJanZqakFqEUwf EwenVANjpVLJut166q/bv9rv3ytsWPz0fKPvlVMWSYamD8M832sL7Xi17clJ9xOV19fa2UvN SJrhFvbnTu3rh9m5+Qtz512XuLDdvssv3vj9bi6pf5cOnT/TfGIu91UrsZM6C8JLtKe+ExL9 fSLAPJLn+Ks3zxwlfFPvG3vnvXfsYvqzeLb/48fvJ6oJKrEUZyQaajEXFScCAHYGw+UPAwAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello On 10/26/2015 07:59 PM, Lee Jones wrote: > On Mon, 26 Oct 2015, Alim Akhtar wrote: > >> Hi Lee, >> Thanks for looking into this. >> >> On 10/26/2015 04:36 PM, Lee Jones wrote: >>> On Mon, 26 Oct 2015, Alim Akhtar wrote: >>> >>>> From: Thomas Abraham >>>> >>>> Add support for S2MPS15 PMIC which is similar to S2MPS11 PMIC. The S2MPS15 >>>> PMIC supports 27 LDO regulators, 10 buck regulators, RTC, three 32.768KHz >>>> clock outputs and battery charger. This patch adds initial support for >>>> LDO and buck regulators of S2MPS15 device. >>>> >>>> Signed-off-by: Thomas Abraham >>>> Signed-off-by: Alim Akhtar >>>> [Alim: Added s2mps15_devs like rtc and clk and related changes] >>>> Reviewed-by: Krzysztof Kozlowski >>>> --- >>>> drivers/mfd/sec-core.c | 31 +++++++ >>>> drivers/mfd/sec-irq.c | 8 ++ >>>> include/linux/mfd/samsung/core.h | 1 + >>>> include/linux/mfd/samsung/s2mps15.h | 161 +++++++++++++++++++++++++++++++++++ >>>> 4 files changed, 201 insertions(+) >>>> create mode 100644 include/linux/mfd/samsung/s2mps15.h >>>> >>>> diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c >>>> index 2626fc0b5b8c..db3d4d4ff805 100644 >>>> --- a/drivers/mfd/sec-core.c >>>> +++ b/drivers/mfd/sec-core.c >>>> @@ -29,6 +29,7 @@ >>>> #include >>>> #include >>>> #include >>>> +#include >>>> #include >>>> #include >>>> #include >>>> @@ -96,6 +97,17 @@ static const struct mfd_cell s2mps14_devs[] = { >>>> } >>>> }; >>>> >>>> +static const struct mfd_cell s2mps15_devs[] = { >>>> + { >>>> + .name = "s2mps15-pmic", >>>> + }, { >>>> + .name = "s2mps15-rtc", >>>> + }, { >>> >>> Why don't these have compatibles? >>> >> s2mps15-pmic does have compatible below in sec_dt_match[]. > > Woah!! What's going on here? You're matching the MFD and Regulator > drivers with the same compatible string. And then registering the > Regulator device as an MFD. That's a bit confusing don't you think? > Sorry for the confusion, as explained in the binding documentation, S2MPS15 is a multi-function device which has rtc, regulator and clk provider as a sub-blocks. And each of these sub-blocks are represented as child node of parent MFD node. Out of these only clk controller child node needs its own compatible string to populate of_node structure of the device so that it can access properties of this sub-node in drivers/clk/clk-s2mps11.c. I just followed "Documentation/devicetree/bindings/mfd/s2mps11.txt" to implement s2mps15. >> s2mps15-rtc does not need one as rtc driver does not support OF yet. >> So no DT node for this as of now. > > [...] >