aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/act8945a-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-01-07regulator: act8945a: Use rdev_get_id() to access id of regulatorAxel Lin1-5/+6
Use rdev_get_id() instead of directly access rdev->desc->id. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-19regulator: act8945a-regulator: make symbol act8945a_pm staticWei Yongjun1-1/+1
Fixes the following sparse warning: drivers/regulator/act8945a-regulator.c:340:1: warning: symbol 'act8945a_pm' was not declared. Should it be static? Fixes: 7482d6ecc68e ("regulator: act8945a-regulator: Implement PM functionalities") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-17regulator: act8945a-regulator: fix 'defined but not used' compiler warningClaudiu Beznea1-1/+1
Fix 'defined but not used' compiler warning for act8945a_suspend() function in case CONFIG_PM_SLEEP is not defined. Fixes: b5ebba46e694 ("regulator: act8945a-regulator: add shutdown function") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reported-by: Andrei Stefanescu <andrei.stefanescu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-12regulator: act8945a-regulator: add shutdown functionClaudiu Beznea1-0/+11
Implement shutdown method to make sure the PMIC will not enter the suspend state when the system is shutdown. This work is based on work done by Borris Brezillon on [1]. [1] https://www.spinics.net/lists/kernel/msg2942960.html Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-12regulator: act8945a-regulator: fix line over 80 chars warningClaudiu Beznea1-1/+2
Fix line over 80 chars checkpatch.pl warning. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-12regulator: act8945a-regulator: Implement PM functionalitiesBoris Brezillon1-5/+181
The regulator supports a dedicated suspend mode. Implement the appropriate ->set_suspend_xx() hooks, add support for ->set_mode(), and provide basic PM ops functionalities to setup the regulator in a suspend state when the system is entering suspend. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> [claudiu.beznea@microchip.com: remove shutdown function, use dev_pm_ops, fix checkpatch warning, adapt commit message, add LDO modes support, move modes constants to active-semi,8945a-regulator.h, remove rdevs from struct act8945a_pmic, add op_mode to act8945a_pmic] Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-12regulator: act8945a-regulator: unlock expert registersClaudiu Beznea1-1/+12
Unlock expert registers for act8945a. This is based on orginal work of Boris Brezillon at [1]. [1] https://www.spinics.net/lists/kernel/msg2942960.html Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31regulator: act8945a-regulator: constify regulator_ops structureBhumika Goyal1-1/+1
Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/act8945a-regulator.o text data bss dec hex filename 3680 464 0 4144 1030 regulator/act8945a-regulator.o File size after: drivers/regulator/act8945a-regulator.o text data bss dec hex filename 3936 192 0 4128 1020 regulator/act8945a-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-05regulator: act8945a: add regulator driver for ACT8945AWenyou Yang1-0/+165
This patch adds new regulator driver to support ACT8945A MFD chip's regulators. The ACT8945A has three step-down DC/DC converters and four low-dropout regulators. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>