aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/da9211-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-03regulator: da9xxx: Switch to SPDX identifierAxel Lin1-15/+5
Convert Dialog Semiconductor DA9xxx regulator drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-13regulator: da9211: Fix notifier mutex lock warningSteve Twiss1-0/+4
The mutex for the regulator_dev must be controlled by the caller of the regulator_notifier_call_chain(), as described in the comment for that function. Failure to mutex lock and unlock surrounding the notifier call results in a kernel WARN_ON_ONCE() which will dump a backtrace for the regulator_notifier_call_chain() when that function call is first made. The mutex can be controlled using the regulator_lock/unlock() API. Fixes: 1028a37daa14 ("regulator: da9211: new regulator driver") Suggested-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-11regulator: da9211: Hand over GPIO to regulator coreLinus Walleij1-0/+6
The GPIO descriptors used by the DA9211 driver are retrieved during probe() and it is really helpful to have those under devres management because of all the errorpaths in the intialization. Using the new dev_gpiod_unhinge() call we can remove the devres management of the descriptor right before handing it over to the regulators core. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-15regulator: Fetch enable gpiods nonexclusiveLinus Walleij1-5/+5
Since the core regulator code is treating GPIO descriptors as nonexclusive, i.e. it assumes that the enable GPIO line may be shared with several regulators, let's add the flag introduced for fixing this problem on fixed regulators to all drivers fetching GPIO descriptors to avoid possible regressions. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-16regulator: da9211: Pass descriptors instead of GPIO numbersLinus Walleij1-12/+11
This augments the DA9211 regulator driver to fetch its GPIO descriptors directly from the device tree using the newly exported devm_get_gpiod_from_child(). Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-10-31regulator: da9211: update for supporting da9223/4/5James Ban1-4/+10
This is update for supporting additional devices da9223/4/5. Only device strings is added because only package type is different. Signed-off-by: James Ban <James.Ban..opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-29regulator: da9211: add descriptions for da9212/da9214James Ban1-4/+9
This is a patch for adding description for da9212/da9214. Signed-off-by: James Ban <James.Ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-12-22regulator: da9*: constify regulator_ops structuresJulia Lawall1-1/+1
The regulator_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30Merge remote-tracking branches 'regulator/topic/mt6311', 'regulator/topic/ocp', 'regulator/topic/owner', 'regulator/topic/pfuze100' and 'regulator/topic/pwm' into regulator-nextMark Brown1-1/+0
2015-07-14regulator: drivers: Drop owner assignment from i2c_driverKrzysztof Kozlowski1-1/+0
i2c_driver does not need to set an owner because i2c_register_driver() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13regulator: da9211: support da9215James Ban1-11/+29
This is a patch for supporting da9215 buck converter. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24regulator: da9211: Pass NULL data with OVER_CURRENT eventGeert Uytterhoeven1-4/+2
According to the documentation, no data is passed with the OVER_CURRENT regulator notifier event. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-24regulator: da9211: Fix wrong register name in error messageGeert Uytterhoeven1-1/+1
We tried to read the CONFIG_E register, not the CONTROL_E register. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-28regulator: da9211: Add gpio control for enable/disable of buckJames Ban1-0/+12
This is a patch for adding gpio control about enable/disable of buck. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-16regulator: da9211: fix unmatched of_nodeJames Ban1-2/+2
This is a patch for fixing unmatched of_node. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-30Merge remote-tracking branches 'regulator/topic/as3711', 'regulator/topic/axp20x', 'regulator/topic/bcm590xx' and 'regulator/topic/da9211' into regulator-nextMark Brown1-21/+151
2014-09-30regulator: da9211: Fix a bug in update of mask bitJames Ban1-1/+1
This is a patch for fixing a bug about mask bit operation. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-05regulator: da9211: Set of_match_table and export device tableAxel Lin1-14/+15
Also move da9211_i2c_id and da9211_dt_ids close to the user for better readability. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-09-03regulator: da9211: Fix missing config.of_node settingAxel Lin1-0/+1
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-29regulator: da9211: fix coccinelle warningsFengguang Wu1-1/+1
drivers/regulator/da9211-regulator.c:281:2-3: Unneeded semicolon Removes unneeded semicolon. Generated by: scripts/coccinelle/misc/semicolon.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-27regulator: da9211: support device treeJames Ban1-7/+78
This is a patch for supporting device tree of DA9211/DA9213. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-17regulator: da9211: Check return value of devm_kzalloc()Axel Lin1-0/+2
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16regulator: da9211: support DA9213James Ban1-20/+75
This is a patch for supporting DA9213. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-25regulator: da9211: Remove unnecessary devm_regulator_unregister() callsAxel Lin1-24/+4
Current code uses devm_regulator_register(), so the resource management code will ensure that the resource is freed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-14regulator: da9211: new regulator driverJames Ban1-0/+388
This is the driver for the Dialog DA9211 Multi-phase 12A DC-DC Buck Converter regulator. It communicates via an I2C bus to the device. Signed-off-by: James Ban <james.ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@linaro.org>