Re: [PATCH 1/2] twl6030: regulator: Fix vsel calculations in set/get voltage apis

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 17, 2010 at 08:54:14PM +0530, Rajendra Nayak wrote:

>  		/* use the first in-range value */
> -		if (min_uV <= uV && uV <= max_uV)
> +		if (min_uV <= uV && uV <= max_uV) {
> +			if (twl_class_is_6030())
> +				/*
> +				 * Use the below formula to calculate vsel
> +				 * mV = 1000mv + 100mv * (vsel - 1)
> +				 */
> +				vsel = (LDO_MV(mV) - 1000)/100 + 1;
>  			return twlreg_write(info, TWL_MODULE_PM_RECEIVER,
>  							VREG_VOLTAGE, vsel);

This looks wrong - this code is inside a loop over vsel->voltage
mappings, if that mapping is wrong and needs to be ignored (which is
what this code is doing) then we shouldn't be looking at it at all.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux