summaryrefslogtreecommitdiff
path: root/drivers/regulator/act8945a-regulator.c
AgeCommit message (Collapse)Author
2019-08-13regulator: act8945a-regulator: fix ldo register addresses in set_mode hookRaag Jadav
According to ACT8945A datasheet[1], operating modes for ldos are controlled by BIT(5) of their respective _CTRL registers. [1] https://active-semi.com/wp-content/uploads/ACT8945A_Datasheet.pdf Fixes: 7482d6ecc68e ("regulator: act8945a-regulator: Implement PM functionalities") Signed-off-by: Raag Jadav <raagjadav@gmail.com> Link: https://lore.kernel.org/r/1565635194-5816-1-git-send-email-raagjadav@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07regulator: act8945a: Use rdev_get_id() to access id of regulatorAxel Lin
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 Yongjun
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 Beznea
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 Beznea
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 Beznea
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 Brezillon
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 Beznea
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 Goyal
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 Yang
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>