regulator: tps80031: support for min voltage tolerance
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 22 Jun 2012 06:42:38 +0000 (11:42 +0530)
committerVarun Wadekar <vwadekar@nvidia.com>
Thu, 12 Jul 2012 04:42:18 +0000 (09:42 +0530)
commit49fc6ff3a7b2673fc4abdafc38259aa806fb2acd
tree9c1201e3cd20eb69ff09405ff31b87fa27cefc5f
parent695d62ee7368992022b4c45ee4d7dfdc56665c61
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