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


Groups > linux.kernel > #1467786

Re: [PATCH 3/9] regulator: core: Try full range when adjusting regulators to constraints

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/9] regulator: core: Try full range when adjusting regulators to constraints
Date 2016-08-22 18:40 +0200
Message-ID <s90qu-ft-33@gated-at.bofh.it> (permalink)
References <s8rj4-3iz-3@gated-at.bofh.it> <s8rj4-3iz-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Sun, Aug 21, 2016 at 10:11:19AM +0800, Chen-Yu Tsai wrote:

> Currently when we try to bring regulator in bounds of its constraints,
> we pick either the minimum or maximum voltage as the target. This fails
> if the regulator range is not continuous, and the target voltage is not
> an exact value the regulator can achieve, i.e. the target is not aligned
> to the step of the regulator.

This seems like you have buggy constraints, constraints which allow
voltages that can't physically be satisfied don't make obvious sense.

> -		if (current_uV < rdev->constraints->min_uV) {
> +		if (current_uV < rdev->constraints->min_uV ||
> +		    current_uV > rdev->constraints->max_uV) {
>  			target_min = rdev->constraints->min_uV;
> -			target_max = rdev->constraints->min_uV;
> -		}
> -
> -		if (current_uV > rdev->constraints->max_uV) {
> -			target_min = rdev->constraints->max_uV;
>  			target_max = rdev->constraints->max_uV;
>  		}

This is most likely going to cause disruption to systems where the
voltage is over the constraint voltage - it will result in the voltage
being lowered to the minimum allowed which will have a much higher
chance of upsetting things.  This is why we don't just do a constraints
run.

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


Thread

[PATCH 3/9] regulator: core: Try full range when adjusting regulators to constraints Chen-Yu Tsai <wens@csie.org> - 2016-08-21 05:10 +0200
  Re: [PATCH 3/9] regulator: core: Try full range when adjusting  regulators to constraints Mark Brown <broonie@kernel.org> - 2016-08-22 18:40 +0200
  Re: [PATCH 3/9] regulator: core: Try full range when adjusting  regulators to constraints Mark Brown <broonie@kernel.org> - 2016-08-22 18:40 +0200
    Re: [PATCH 3/9] regulator: core: Try full range when adjusting  regulators to constraints Rask Ingemann Lambertsen <ccc94453@vip.cybercity.dk> - 2016-08-22 20:00 +0200
      Re: [PATCH 3/9] regulator: core: Try full range when adjusting  regulators to constraints Mark Brown <broonie@kernel.org> - 2016-08-22 20:20 +0200
        Re: [PATCH 3/9] regulator: core: Try full range when adjusting  regulators to constraints Chen-Yu Tsai <wens@csie.org> - 2016-08-23 06:20 +0200
          Re: [PATCH 3/9] regulator: core: Try full range when adjusting  regulators to constraints Mark Brown <broonie@kernel.org> - 2016-08-23 13:30 +0200

csiph-web