regulator: max77620: Add support for device specific ramp rate setting
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 22 Apr 2016 12:39:41 +0000 (18:09 +0530)
committerMark Brown <broonie@kernel.org>
Fri, 22 Apr 2016 15:26:41 +0000 (16:26 +0100)
commit5aa43599daddbe972f955b2357c76866a6f92973
tree4aecd5266aeb3bbeaa41e7fdf257fd9b65e158fa
parente7fc278ceb5725070e4e3ecfc2f259ab2101c30e
regulator: max77620: Add support for device specific ramp rate setting

Maxim advertised the ramp rate of the rail with some recommended
design specification like output capacitance of rail should be
2.2uF. This make sure that current change in the rail is within
maximum current limit and hence meet the advertised ramp rate.

If there is variation in design which causes the rail current to
change more that maximum current limit then device applies the
current limit. In this case, ramp rate is different than advertised
ramp rate.

Add device specific settings for ramp rate which need to be configure
on device register when measure ramp rate on platform is deviated from
advertised ramp rate. In this case, all delay time calculation for
voltage change is done with measured ramp rate and device ramp rate
is used for configuring the device register.

If measured ramp rate in the platform is same as advertised ramp rate
then regulator-ramp-delay is used for the device register configuration
and ramp time calculation for voltage change.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max77620-regulator.c