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


Groups > linux.kernel > #1610131

Re: [PATCH v3] regulator: core: Limit propagation of parent voltage count and list

From Javier Martinez Canillas <javier@osg.samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3] regulator: core: Limit propagation of parent voltage count and list
Date 2017-03-28 00:50 +0200
Message-ID <tpLCx-6Cv-1@gated-at.bofh.it> (permalink)
References <tpKwN-5V5-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hello Matthias,

On 03/27/2017 05:31 PM, Matthias Kaehlcke wrote:
> Commit 26988efe11b1 ("regulator: core: Allow to get voltage count and
> list from parent") introduces the propagation of the parent voltage
> count and list for regulators that don't provide this information
> themselves. The goal is to support simple switch regulators, however as
> a side effect normal continuous regulators can leak details of their
> supplies and provide consumers with inconsistent information.
> 
> Limit the propagation of the voltage count and list to switch
> regulators.
> 

Should we add a Fixes: 26988efe11b1 ("regulator: core: Allow to get voltage
count and list from parent") tag?

> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> Changes in v3:
>  - Removed unused variable ops from regulator_count_voltages()
>  - Updated commit message to use correct format for referencing commits
>  (sorry, both stem from using different trees for testing and upstreaming)
>

You should add complete patch history, not only the delta with latest version.

[snip]

>  
> +	if (!rdev->desc->ops->get_voltage &&
> +	    !rdev->desc->ops->get_voltage_sel &&
> +	    !rdev->desc->ops->list_voltage &&
> +	    !rdev->desc->fixed_uV)
> +		rdev->is_switch = true;
> +

Again, I think the check for get_voltage_sel is superfluous since !list_voltage
implies the former, otherwise regulator_register() would had returned -EINVAL.

Patch looks good to me though and I also see no regressions with it so:

Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

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


Thread

[PATCH v3] regulator: core: Limit propagation of parent voltage count and list Matthias Kaehlcke <mka@chromium.org> - 2017-03-27 23:40 +0200
  Re: [PATCH v3] regulator: core: Limit propagation of parent voltage  count and list Javier Martinez Canillas <javier@osg.samsung.com> - 2017-03-28 00:50 +0200

csiph-web