ARM: OMAP3: Fix voltage control for deeper idle states
authorTony Lindgren <tony@atomide.com>
Tue, 6 May 2014 00:27:36 +0000 (17:27 -0700)
committerTony Lindgren <tony@atomide.com>
Tue, 6 May 2014 22:39:25 +0000 (15:39 -0700)
commitc46f601cc2a0e8edc97953c0b5d2acb709be71ba
tree3fdb93efa92babcfd636f749fbbedcea2393b41c
parent9eca2837dd69eeae0dd36ed0853d04b4de6c23bd
ARM: OMAP3: Fix voltage control for deeper idle states

Currently we're attempting to use a static value for the
voltctrl register that only works for controlling the PMIC
over I2C4. For using sys_off_mode signaling, we need to update
update clksetup, voltsetup1, voltsetup2 and voltctrl registers
dynamically depending on the idle state.

So let's fix this by configuring things for I2C4 controlled idle
and sys_off_mode pin controlled idle, and then write the
configured register values depending on the idle state. This
is similar what N900 kernel is doing too.

Cc: Kevin Hilman <khilman@linaro.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/vc.c