ARM: OMAP2+: voltage: ensure voltage used is exact voltage from OPP table
authorKevin Hilman <khilman@ti.com>
Fri, 2 Mar 2012 22:08:57 +0000 (14:08 -0800)
committerGrazvydas Ignotas <notasas@gmail.com>
Tue, 3 Apr 2012 21:00:39 +0000 (00:00 +0300)
commita134c61f5bfd084dba9fe5157bce83214ec15549
tree5c2f3580eb8a059e03aee173475e511c863b2d60
parenta08261b958f682799d02fc99cc77ab7bd39b815d
ARM: OMAP2+: voltage: ensure voltage used is exact voltage from OPP table

When using the SMPS regulators to scale voltages, the regulator
framework may pass a minimum voltage that is not an exact OPP voltage.
For the VC/VP controlled voltage domains, we must ensure that the
voltage requested is the exact voltage from the OPP table.  This is
especially critical when using SR.

To fix, voltdm_scale() uses the target voltage passed to walk through
the OPP voltages until it finds a voltage that is >= one of the OPP
voltages.

Cc: Tero Kristo <t-kristo@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/voltage.c