mfd: max77xxx: Support using a nonzero DVS index for BUCKs

At the moment, the max77xxx driver doesn't support the GPIO-DVS
feature of the max77686 and max77802.  The existing code always just
assumed that the DVS and SELB lines on the PMIC were hardwired to 0.
That meant that updating the voltages invloved updating "slot 1"
(index 0) of the BUCK config registers.

One downside of using slot 1 of the PMIC is that, on all boards I've
seen including exynos5420-pit, slot 1 is automatically selected at
warm reset time.  Also on all boards that I've seen, warm reset is not
communicated to the max77xxx PMIC.  That means that if we modify slot
1 and do a warm reset we'll be running at voltages that may be lower
than the initial power on voltages of the board.  This can make it
difficult for the bootloader to come up at full speed.

There is no downside to the kernel using a different slot, so we can
be a little kinder to the bootloader by allowing the kernel to specify
a different slot to run in.

Note that this change _doesn't_ enable GPIO-DVS support: it merely
changes which default DVS slot the kernel works with.  This change
doesn't preclude someone later coming along and enabling GPIO-DVS
support if they found it useful, so long as they were aware of any
assumptions that the bootloader makes about the state of slot 1 at
warm reset time.

Note also that bindings and code are based loosely on the
max8997-regulator bindings, which actually does support DVS.

BUG=chrome-os-partner:21430
TEST=Boot up the system; seems reliable.
TEST=suspend_stress_test
TEST=Run tests as per chrome-os-partner:21341

Change-Id: I33ef19a67149e487ef993e7c8d4326c2f1d90edb
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/63779
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
mfd: max77xxx: Preserve firmware voltage at bootup

In the change (ba7ece1 mfd: max77xxx: Support using a nonzero DVS
index for BUCKs) I added the feature for the kernel to use a non-zero
DVS slot.  This had the unintended side effect of ignoring the voltage
that the firmware had set the system up in--not a good idea.  Change
the regulator code to preserve the firmware's values by copying them
over to the new slot.

BUG=chrome-os-partner:21430
TEST=Manual:
Before (after a cold reset):
  dmesg | grep vdd_arm
  => [    2.632594] vdd_arm: 800 <--> 1500 mV at 1000 mV
Before (in some cases after a warm reset):
  dmesg | grep vdd_arm
  => [    2.606735] vdd_arm: 800 <--> 1500 mV at 900 mV
After (always):
  dmesg | grep vdd_arm
  => [    2.632594] vdd_arm: 800 <--> 1500 mV at 1262 mV

Change-Id: Ic7d9647912d4227c1492ca3aa10b506fcc3e41f5
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/64651
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>