From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755080AbcA2MLZ (ORCPT ); Fri, 29 Jan 2016 07:11:25 -0500 Received: from mailgw02.mediatek.com ([210.61.82.184]:15474 "EHLO mailgw02.hq.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751048AbcA2MLY (ORCPT ); Fri, 29 Jan 2016 07:11:24 -0500 Message-ID: <1454069479.10861.30.camel@mtksdaap41> Subject: Re: [PATCH V4 2/2] regulator: mt6323: Add support for MT6323 regulator From: menghui lin To: Mark Brown CC: John Crispin , Liam Girdwood , HenryC Chen =?UTF-8?Q?=28=E9=99=B3=E5=BB=BA=E8=B1=AA=29?= , , , Matthias Brugger , Chen Zhong , Date: Fri, 29 Jan 2016 20:11:19 +0800 In-Reply-To: <20160129112717.GP4130@sirena.org.uk> References: <1453896059-44589-1-git-send-email-blogic@openwrt.org> <1453896059-44589-2-git-send-email-blogic@openwrt.org> <20160127144105.GQ6042@sirena.org.uk> <56AA5A5C.9080402@openwrt.org> <20160128231306.GD4130@sirena.org.uk> <1454061134.10861.14.camel@mtksdaap41> <20160129112717.GP4130@sirena.org.uk> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2016-01-29 at 12:27 +0100, Mark Brown wrote: > On Fri, Jan 29, 2016 at 05:52:14PM +0800, menghui lin wrote: > > On Fri, 2016-01-29 at 00:13 +0100, Mark Brown wrote: > > > > I'm not convinced this binding makes sense, how would a user of the API > > > (currently there are none in tree) know what the modes mean? It's a bit > > > different when the user is supplying configuration for a specific > > > regulator but this needs to be something that can be used by consumers. > > > > What are you actually trying to do with this? > > > In this patch, we want to support both normal/standby modes for mt6323 > > regulators due to mt6323 regulators support low power mode which > > provides better power efficiency for standby case. > > > We expect user of mt6323 regulators could dynamically change power mode > > by regulator_set_mode(). -EINVAL is returned if the given mode is not > > supported. > > > The regulator_set_mode() API looks very straightforward and possible > > modes are already defined in consumer.h. It looks like we don't have to > > list possible modes for mt6323 additionally in binding document. > > None of this is answering my question - I know what the current API is, > describing it doesn't tell me about actual users or how they are able to > sensibly use the interface. Bear in mind that the definitions of the > various modes are all relative and what one device thinks is high usage > may be low usage for another device. Assuming valid_modes_mask and initial_mode are specified, a possible way to modify regulator_set_mode() is to allow mode change only if the regulator is controlled exclusively by a certain consumer or the requested mode provides stronger power capability than current mode. Here I assume that power capability fast > normal > idle > standby.