From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751661AbdJYNKq (ORCPT ); Wed, 25 Oct 2017 09:10:46 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:40512 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbdJYNKn (ORCPT ); Wed, 25 Oct 2017 09:10:43 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20171025131041euoutp0159fc2540db3887ae351249a721e672cf~w0j6NoyOT2655526555euoutp01c X-AuditID: cbfec7f2-f793b6d000003243-a1-59f08d500a71 Subject: Re: [RFC PATCH v2 1/3] regulator: bindings: Add properties for coupled regulators To: Rob Herring Cc: "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , Mark Brown , Liam Girdwood , Mark Rutland , Marek Szyprowski , Bartlomiej Zolnierkiewicz From: Maciej Purski Message-id: <48819030-3cc7-8223-3bff-e0b860c2d21d@samsung.com> Date: Wed, 25 Oct 2017 15:10:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset="utf-8"; format="flowed" Content-language: en-US Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEKsWRmVeSWpSXmKPExsWy7djPc7oBvR8iDd6f5bHYOGM9q8XUh0/Y LOYfOcdq8e1KB5PF5V1z2CzWHrnLbrH0+kUmi/97drA7cHismbeG0WPnrLvsHptWdbJ59G1Z xejxeZNcAGsUl01Kak5mWWqRvl0CV8aWW+4Fm4Ur2h//YmlgPM/fxcjJISFgIrHu5kIWCFtM 4sK99WxdjFwcQgJLGSW2fWhhhHA+M0ps/v6YEaZj4a/DLBCJZYwS5/ueM0E4zxgllqxZxw5S JSwQI3H+4nxmEFtEQFHid9s0VpAiZoFLTBIP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C 0rKAkWUVo0hqaXFuem6xkV5xYm5xaV66XnJ+7iZGYGxsO/Zzyw7GrnfBhxgFOBiVeHgFpr+P FGJNLCuuzD3EKMHBrCTCy1H6IVKINyWxsiq1KD++qDQntfgQozQHi5I4b++e1ZFCAumJJanZ qakFqUUwWSYOTqkGRp3c3Qq/jgkvWsne13gySG2eaHrX4nph3tU6q/LUj+lk2LZMuuFzgUPg 7IMFiUyRDKfnvvhTPef/r8mhD08K3PH+ddPaIXpRoMCU76b9wYGJv7lXpf+4kHWpW6d7vsLE O7MSY5d/WtES84HRNLfje5f3oZXPRTIvB97f/eQDc4xLfn3bp18/+pVYijMSDbWYi4oTAYbl 5NSJAgAA X-CMS-MailID: 20171025131039eucas1p21d6f7d13d4fcce16182ff6b0dc69c07a X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20171018124727eucas1p255ccce41852d5585640f2d97153d2fa8 X-RootMTR: 20171018124727eucas1p255ccce41852d5585640f2d97153d2fa8 References: <1508330822-8039-1-git-send-email-m.purski@samsung.com> <1508330822-8039-2-git-send-email-m.purski@samsung.com> <20171024185801.bq27wszp7socsxqx@rob-hp-laptop> <76404da2-fe50-b124-0f18-e93e3cb14014@samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/25/2017 02:59 PM, Rob Herring wrote: > On Wed, Oct 25, 2017 at 2:31 AM, Maciej Purski wrote: >> >> >> On 10/24/2017 08:58 PM, Rob Herring wrote: >>> >>> On Wed, Oct 18, 2017 at 02:47:00PM +0200, Maciej Purski wrote: >>>> >>>> Some regulators require keeping their voltage spread below defined >>>> max_spread. >>>> >>>> Add properties to provide information on regulators' coupling. >>>> >>>> Signed-off-by: Maciej Purski >>>> --- >>>> Documentation/devicetree/bindings/regulator/regulator.txt | 4 ++++ >>>> 1 file changed, 4 insertions(+) >>>> >>>> diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt >>>> b/Documentation/devicetree/bindings/regulator/regulator.txt >>>> index 378f6dc..6769565 100644 >>>> --- a/Documentation/devicetree/bindings/regulator/regulator.txt >>>> +++ b/Documentation/devicetree/bindings/regulator/regulator.txt >>>> @@ -60,6 +60,10 @@ Optional properties: >>>> 0: Disable active discharge. >>>> 1: Enable active discharge. >>>> Absence of this property will leave configuration to default. >>>> +- regulator-coupled-with: Phandle to regulators with which the regulator >>>> + should be coupled. Allow up to 9 phandles. >>> >>> >>> 9? Sounds like a driver detail and pretty arbitrary. >>> >> It's just a constant number that I defined as MAX_COUPLED, because in fact >> there isn't any use-case yet for even more than two regulators so >> MAX_COUPLED equal to 9 is a really high number. If you find it cleaner, I >> can make this value variable. > > Just drop the statement. The OS simply needs to support however many > there are for the h/w it supports. > Ok, I get this. >> >>> Is this linkage 2-way meaning 2 coupled regulators both have links to >>> the other one? If so, then what happens when you have a high number? If >>> not, how does one decide which regulator has this property? >> >> >> Yes, it is 2-way. When you have a high number, then each regulator should >> have phandles to every other. So, if you have 3 regulators coupled, then >> each one should have 2 phandles. > > Please add this to the description. That doesn't really seem ideal if > you have a lot, but I somewhat doubt we'll see more than 2-3. > > Rob > I'll fix the description in the next version. Yes, I agree that we won't see more than 2-3 coupled regulators. Best Regards, Maciej Purski