summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/da9063-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'regulator/topic/devm' into regulator-nextMark Brown2013-10-241-17/+4
|\
| * regulator: da9063: use devm_regulator_register()Jingoo Han2013-09-301-17/+4
| | | | | | | | | | | | | | Use devm_regulator_register() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge remote-tracking branch 'regulator/topic/da9063' into regulator-nextMark Brown2013-10-241-1/+1
|\ \
| * | regulator: da9063: Add missing initialization of da9063_reg_matchesGeert Uytterhoeven2013-09-171-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | With gcc 4.1.2: drivers/regulator/da9063-regulator.c: In function ‘da9063_regulator_probe’: drivers/regulator/da9063-regulator.c:847: warning: ‘da9063_reg_matches’ is used uninitialized in this function If the parent device already has platform data, da9063_reg_matches will not be initialized. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: da9063: Fix PTR_ERR/ERR_PTR mismatchGeert Uytterhoeven2013-09-101-1/+1
|/ | | | | | | | | | | | | | If CONFIG_OF=n: drivers/regulator/da9063-regulator.c: In function ‘da9063_parse_regulators_dt’: drivers/regulator/da9063-regulator.c:712: warning: passing argument 1 of ‘PTR_ERR’ makes pointer from integer without a cast drivers/regulator/da9063-regulator.c:712: warning: return makes pointer from integer without a cast Use ERR_PTR() to encode an error code in a pointer. PTR_ERR() is meant to decode an error code from a pointer. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: da9063: Statize da9063_ldo_lim_eventAxel Lin2013-09-011-1/+1
| | | | | | | da9063_ldo_lim_event() is only referenced in this driver, make it static. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: da9063: Use IS_ERR to check return value of regulator_register()Axel Lin2013-08-301-1/+1
| | | | | | | regulator_register() does not return NULL, it returns ERR_PTR on error. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: da9063: Optimize da9063_set_current_limit implementationAxel Lin2013-08-301-11/+4
| | | | | | | | | All the current limit tables have the values in ascend order. So we can slightly optimize the for loop iteration because the first match is the minimal value. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: da9063: Add Dialog DA9063 voltage regulators support.Krystian Garbaciak2013-08-291-0/+941
The driver adds support for the following DA9063 PMIC regulators: - 11x LDOs (named LDO1 - LDO11), - 6x buck converters (BCORE1, BCORE2, BPRO, BMEM, BIO, BPERI), Regulators provide following operations: - REGULATOR_CHANGE_STATUS and REGULATOR_CHANGE_VOLTAGE for all regulators, - REGULATOR_CHANGE_MODE for LDOs and buck converters, where: - LDOs allow REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY, - buck converters allow REGULATOR_MODE_FAST, REGULATOR_MODE_NORMAL and REGULATOR_MODE_STANDBY, - REGULATOR_CHANGE_CURRENT for buck converters (current limits). The driver generates REGULATOR_EVENT_OVER_CURRENT for LDO3, LDO4, LDO7, LDO8 and LDO11. Internally, PMIC provides two voltage configurations for normal and suspend system state for each regulator. The driver switches between those on suspend/wake-up to provide quick and fluent output voltage change. This driver requires MFD core driver for operation. Signed-off-by: Krystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud