regulator: tps80031: support for min voltage tolerance
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 22 Jun 2012 06:42:38 +0000 (11:42 +0530)
committerRohan Somvanshi <rsomvanshi@nvidia.com>
Mon, 2 Jul 2012 13:16:10 +0000 (06:16 -0700)
commit33b50b0bf4e501a81605c4351ff163d82c87e0d1
treea4ab7e8b4396141a90c9502449b7bfcd628a08bc
parent7cf0e9ac73f66586b15ca96a86c7d95aecc9f4d7
regulator: tps80031: support for min voltage tolerance

Sometimes the system allow to run in less than requested
minimum voltage and if this tolerance allow the regulator
to set voltage in lower side range than this saves the power.
For the example, if client request vmin = 975mV for regulator
voltage then it sets the voltage to 987.5mv as the nearest to this
desired value. The next lower side for the voltage is 974.8mv.
So if system runs on tolerance of 1mv and if it request for
975mv then driver can look for minimum voltage as 975 - tolerance(1)
= 974mv and possible configure 974.8mv rather than 987.5mV and so
it can save the power equivalent to 12.5mV higher voltage.

Support the configuration of tolerance value.

Change-Id: Ic8312bb397c2615a3ee0f84072ec394e513525ea
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/110523
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
drivers/regulator/tps80031-regulator.c
include/linux/regulator/tps80031-regulator.h