summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/twl6030-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Use fallthrough pseudo-keywordGustavo A. R. Silva2020-08-231-1/+1
| | | | | | | | | | Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
* regulator: use linear_ranges helperMatti Vaittinen2020-05-081-1/+1
| | | | | | | | | | | Change the regulator helpers to use common linear_ranges code. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/64f01d5e381b8631a271616b7790f9d5640974fb.1588944082.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: twl6030: workaround the VMMC reset behaviorGregory CLEMENT2019-08-091-1/+14
| | | | | | | | | | | | | | | | | During reset the VMMC regulator doesn't reach 0V and only drops to 1.8V, furthermore the pulse width is under 200us whereas the SD specification expect 1ms. The WR_S bit allows the TWL6030 to no reset at all the VMMC during warm reset and keep the current voltage. Thanks to this workaround the SD card doesn't reach a undefined reset stage. Actually this behavior is available for all the LDO regulator, so the driver will also allow to use it with any of these regulator. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20190725094542.16547-4-gregory.clement@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: twl6030: use variable for device nodeGregory CLEMENT2019-08-091-3/+3
| | | | | | | | Instead of refering the full pdev->dev.of_node use a local variable. Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> Link: https://lore.kernel.org/r/20190725094542.16547-3-gregory.clement@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152Thomas Gleixner2019-05-301-5/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* regulator: twl6030: Constify regulator_opsAxel Lin2019-02-201-4/+4
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: twl6030: Use regulator_list_voltage_linear_range for twl6030ldo_opsAxel Lin2019-02-201-46/+27
| | | | | | | | | Use linear range to replace the twl6030ldo_list_voltage implementation. With this change, the min_mV is not used and can be removed from struct twlreg_info. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: twl6030: Use of_device_get_match_data()Axel Lin2019-01-141-6/+1
| | | | | | | Use of_device_get_match_data() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* mfd: twl: Move header file out of I2C realmWolfram Sang2017-09-041-1/+1
| | | | | | | | | | | | | | | | | | | | | include/linux/i2c is not for client devices. Move the header file to a more appropriate location. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Daniel Thompson <daniel.thompson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Lee Jones <lee.jones@linaro.org>
*-. Merge remote-tracking branches 'regulator/topic/notifier', ↵Mark Brown2017-04-301-2/+0
|\ \ | | | | | | | | | 'regulator/topic/pfuze100', 'regulator/topic/settle', 'regulator/topic/tps65132' and 'regulator/topic/twl6030' into regulator-next
| | * regulator: twl6030: remove redundant range check min_uV > 1300000 && min_uV ↵Colin Ian King2017-03-241-2/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | <= 1350000 It has been pointed out to me that the range for vsel = 58 is actually dead code as this is covered by an earlier check for (min_uV >= 700000) && (min_uV <= 1420000) so remove that check completely. Reported-by: Alban Auzeill <alban.auzeill@sonarsource.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / regulator: twl6030: fix range comparison, allowing vsel = 59Colin Ian King2017-01-181-1/+1
|/ | | | | | | | | | | | The range min_uV > 1350000 && min_uV <= 150000 is never reachable because of a typo in the previous range check and hence vsel = 59 is never reached. Fix the previous range check to enable the vsel = 59 setting. Fixes CoverityScan CID#728454 ("Logially dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: twl6030: Remove unused fields from struct twlreg_infoAxel Lin2016-11-231-29/+17
| | | | | | | | The table_len, *table, remap and max_mV fields are not used, so remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: twl: split twl6030 logic into its own fileNicolae Rosia2016-11-161-0/+805
In order to not break existing users, we keep using the same CONFIG symbol. This makes it easier to add support for TWL6032 and refactor mfd/twl-core. Checkpatch warnings are inherited from twl-regulator.c and will be addressed in a subsequent patch. Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com> Signed-off-by: Mark Brown <broonie@kernel.org>