regulator: max1586: Implement get_voltage_sel callback
authorAxel Lin <axel.lin@ingics.com>
Thu, 29 Nov 2012 05:19:43 +0000 (13:19 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 10 Dec 2012 03:23:56 +0000 (12:23 +0900)
commit4efd9dfecbf19a7a28f29b1142c07ba8327f2c8a
treebf1a4b7e00a98a0d98abe3a76a4955b19bf20f8c
parent9489e9dcae718d5fde988e4a684a0f55b5f94d17
regulator: max1586: Implement get_voltage_sel callback

This is required since commit f7df20ec32
"regulator: core: Use list_voltage() to read single voltage regulators",
otherwise _regulator_get_voltage returns rdev->desc->ops->list_voltage(rdev, 0).

The Maxim 1586 controls V3 and V6 voltages, but offers no way of reading back
the set up value. Thus this patch caches the setting when setting new voltage.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/max1586.c