From 33b50b0bf4e501a81605c4351ff163d82c87e0d1 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 22 Jun 2012 12:12:38 +0530 Subject: 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 Reviewed-on: http://git-master/r/110523 Reviewed-by: Rohan Somvanshi Tested-by: Rohan Somvanshi --- include/linux/regulator/tps80031-regulator.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/linux/regulator/tps80031-regulator.h b/include/linux/regulator/tps80031-regulator.h index 1670d147fc3e..4dfdf7950918 100644 --- a/include/linux/regulator/tps80031-regulator.h +++ b/include/linux/regulator/tps80031-regulator.h @@ -74,6 +74,9 @@ enum { * @flags: Configuration flag to configure the rails. It should be ORed of * above enums. * @delay_us: Delay in microsecond after setting the desired voltage. + * @tolerance_uv: Tolerance micorvolts in minimum side. The voltage min + * will be adjusted to this tolerance like + * actual_vmin = vmin - tolerance_uv */ struct tps80031_regulator_platform_data { @@ -84,6 +87,7 @@ struct tps80031_regulator_platform_data { unsigned int ext_ctrl_flag; unsigned int flags; int delay_us; + unsigned int tolerance_uv; }; #endif /* __REGULATOR_TPS80031_H */ -- cgit v1.2.3