Commit graph

4 commits

Author SHA1 Message Date
Axel Lin
fedd89b1aa regulator: palmas: Slightly code change for better readability
It's a little bit hard to read that the "else" case means id == PALMAS_REG_SMPS10.

if (id != PALMAS_REG_SMPS10){
        do something for the cases id != PALMAS_REG_SMPS10;
} else {
        do something for the case id == PALMAS_REG_SMPS10;
}

This patch changes above syntax to switch statement.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-08 07:36:38 +08:00
Axel Lin
999f0c7cb8 regulator: palmas: Clear PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits in palmas_set_mode_smps
Current code actually clears more bits than PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-08 07:30:04 +08:00
Axel Lin
8029a00686 regulator: palmas: Use regulator_[list|map]_voltage_linear() for palmas_ops_smps10
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03 13:25:04 +01:00
Graeme Gregory
e5ce4208f1 regulator: regulator driver for Palmas series chips
Palmas has both Switched Mode (SMPS) and Linear (LDO) regulators in it.
This regulator driver allows software control of these regulators.

The regulators available on Palmas series chips vary depending on the muxing.
This is handled automatically in the driver by reading the mux info from OTP.

Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-19 12:45:18 +01:00