summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/s2mpa01.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: s2mpa01: zero-initialize regulator match table arrayJavier Martinez Canillas2014-11-031-1/+1
| | | | | | | | | | | The struct of_regulator_match rmatch[] is declared as a non-static local variable so the structure members are not auto-initialized. Initialize the array at declaration time to avoid the structure members values to be indeterminate and have sane defaults instead. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: s2mpa01: Optimize the regulator description macroAmit Daniel Kachhap2014-08-161-98/+36
| | | | | | | | | | | | | | | This patch makes the regulator description macro take minimum and steps voltage as parameter. In this way many repeated macros can be removed. Now these macros are repeated only if the the LDO/BUCK ctrl registers have non-linear positions. The good thing is these ctrl registers are mostly linear so they are not passed as parameters. This patch reduces the code size and also allow easy addition of more s2mpxxx PMIC drivers which differs a lot in minimum/step voltages. Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: s2mpxxx: Move regulator min/step voltages in common placeAmit Daniel Kachhap2014-08-161-16/+16
| | | | | | | | | | | This is a cleanup patch and moves min/step voltages in a common samsung header file so that they can be used by other s2mpxxx PMIC drivers. Only few required macros are added currently and others can be added if needed. Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'regulator/topic/palmas', ↵Mark Brown2014-06-021-7/+11
|\ \ | | | | | | | | | 'regulator/topic/pbias', 'regulator/topic/pfuze100', 'regulator/topic/s2mpa01' and 'regulator/topic/s2mps11' into regulator-next
| | * regulator: s2mpa01: Use rdev_get_id() to access id of regulatorKrzysztof Kozlowski2014-05-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Use regulator API rdev_get_id() to access id of regulator. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * regulator: s2mpa01: Fix accidental enable of buck4 ramp delayKrzysztof Kozlowski2014-05-171-5/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | S2MPA01 supports enabling/disabling ramp delay only for buck[1234]. Other bucks have ramp delay enabled always. However the bit shift for enabling buck4 ramp delay in register is equal to 0. When ramp delay was set for the bucks unsupporting enable/disable (buck[56789] and buck10), the ramp delay for buck4 was also enabled. Fixes: f7b1a8dc1c1c ("regulator: s2mpa01: Don't check enable_shift before setting enable ramp rate") Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: s2mpa01: Use correct register for buck1 ramp delayKrzysztof Kozlowski2014-05-261-1/+0
|/ | | | | | | | | | | | | | | Fix the register for ramp delay of buck1 regulator. Buck1 and buck6 share the field (offset 4) in ramp delay register S2MPA01_REG_RAMP2. The driver used the same register and field for ramp delay of buck3 and buck1. This lead to updating of ramp delay of buck3 when setting buck1 and actually the ramp delay of buck1 was never set. Fixes: f18792714608 ("regulator: Add support for S2MPA01 regulator") Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: <stable@vger.kernel.org>
* regulator: s2mpa01: Don't check enable_shift before setting enable ramp rateAxel Lin2014-04-021-7/+5
| | | | | | | | | Current code misses updating the register when enable_shift is 0. e.g. S2MPA01_BUCK4_RAMP_EN_SHIFT is 0. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: Add support for S2MPA01 regulatorSachin Kamat2014-03-181-0/+481
Add support for S2MPA01 voltage and current regulator. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
OpenPOWER on IntegriCloud