Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347643

Re: [PATCH 2/4] regulator: core: Add support for active-discharge configuration

From Laxman Dewangan <ldewangan@nvidia.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] regulator: core: Add support for active-discharge configuration
Date 2016-03-02 03:20 +0100
Message-ID <r84yn-144-31@gated-at.bofh.it> (permalink)
References <r7S4a-Pg-1@gated-at.bofh.it> <r7S4b-Pg-37@gated-at.bofh.it> <r845j-yf-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wednesday 02 March 2016 07:14 AM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Tue, Mar 01, 2016 at 06:08:13PM +0530, Laxman Dewangan wrote:
>
>> + * @active_discharge: Enable/disable active discharge. The values are:
>> + *		      -1: Default, 0: Disable, 1: Enable.
> This isn't a good interface, it means that 0 (which is the default value
> for static constrants or kzalloc()ed constraints) means to actively
> discharge rather than leave the settings unchanged but our general
> policy is to not touch anything unless explicitly told to do so.
>
Yaah, I agree.
I had other option to use 0 as default, 1 as disable and 2 as enable. 
but generally for disable, we use 0 and for enable 1 and that's why I 
went to -1,0,1 approach.

Will it be fine to have this as
   0: Default i..e do not change.
   1: disable.
   2: Enable.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/4] regulator: Add support for configuration of active-discharge Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-01 14:00 +0100
  [PATCH 4/4] regulator: max77620: Add support to configure active-discharge Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-01 14:00 +0100
  [PATCH 1/4] regulator: DT: Add DT property for active-discharge configuration Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-01 14:00 +0100
  [PATCH 3/4] regulator: helper: Add helper to configure active-discharge using regmap Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-01 14:00 +0100
  [PATCH 2/4] regulator: core: Add support for active-discharge configuration Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-01 14:00 +0100
    Re: [PATCH 2/4] regulator: core: Add support for active-discharge  configuration Mark Brown <broonie@kernel.org> - 2016-03-02 02:50 +0100
      Re: [PATCH 2/4] regulator: core: Add support for active-discharge  configuration Laxman Dewangan <ldewangan@nvidia.com> - 2016-03-02 03:20 +0100
        Re: [PATCH 2/4] regulator: core: Add support for active-discharge  configuration Mark Brown <broonie@kernel.org> - 2016-03-02 04:20 +0100

csiph-web