regulator: Fix default constraints for fixed voltage regulators

Default voltage constraints were being provided for fixed voltage
regulator where board constraints were not provided but these constraints
used INT_MIN as the default minimum voltage which is not a valid value
since it is less than zero. Use 1uV instead.

Also set the default values we set in the constraints themselves since
otherwise the max_uV constraint we determine will not be stored in the
actual constraint strucutre and will therefore not be used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>

authored by Mark Brown and committed by Liam Girdwood 3e590918 030853b7

+5 -2
+5 -2
drivers/regulator/core.c
··· 703 703 int cmin = constraints->min_uV; 704 704 int cmax = constraints->max_uV; 705 705 706 - /* it's safe to autoconfigure fixed-voltage supplies */ 706 + /* it's safe to autoconfigure fixed-voltage supplies 707 + and the constraints are used by list_voltage. */ 707 708 if (count == 1 && !cmin) { 708 - cmin = INT_MIN; 709 + cmin = 1; 709 710 cmax = INT_MAX; 711 + constraints->min_uV = cmin; 712 + constraints->max_uV = cmax; 710 713 } 711 714 712 715 /* voltage constraints are optional */