summaryrefslogtreecommitdiff
path: root/include/linux/regulator (follow)
Commit message (Collapse)AuthorAge
* Merge branch 'android-4.4-p' of ↵Michael Bestas2020-03-08
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998 This brings LA.UM.8.4.r1-05200-8x98.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: 4db1ebdd40ec0 FROMLIST: HID: nintendo: add nintendo switch controller driver Conflicts: arch/arm64/boot/Makefile arch/arm64/kernel/psci.c arch/x86/configs/x86_64_cuttlefish_defconfig drivers/md/dm.c drivers/of/Kconfig drivers/thermal/thermal_core.c fs/proc/meminfo.c kernel/locking/spinlock_debug.c kernel/time/hrtimer.c net/wireless/util.c Change-Id: I5b5163497b7c6ab8487ffbb2d036e4cda01ed670
| * regulator: ab8500: Remove SYSCLKREQ from enum ab8505_regulator_idStephan Gerhold2020-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 458ea3ad033fc86e291712ce50cbe60c3428cf30 upstream. Those regulators are not actually supported by the AB8500 regulator driver. There is no ab8500_regulator_info for them and no entry in ab8505_regulator_match. As such, they cannot be registered successfully, and looking them up in ab8505_regulator_match causes an out-of-bounds array read. Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505") Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20191106173125.14496-2-stephan@gerhold.net Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * regulator: Fix return value of _set_load() stubMark Brown2019-12-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ Upstream commit f1abf67217de91f5cd3c757ae857632ca565099a ] The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang <cychiang@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
* | drivers: regulator: Add snapshot of OnSemi NCP6335D regulatorAnirudh Ghayal2017-05-03
| | | | | | | | | | | | | | | | This is snapshot of the OnSemi NCP6335D driver as of msm-3.10 'commit 156ba1726643 ("regulator: onsemi-ncp6335d: Add i2c retry logic")'. Change-Id: I4cf0acd272fcf498462d4397385cd62f144eadf8 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
* | regulator: qpnp-labibb: Handle LAB short circuit(SC) detectionKiran Gunda2017-04-19
| | | | | | | | | | | | | | | | | | | | On certain PMICs, there is no short circuit (SC) detection available in LAB module. Add support to detect it manually and disable LAB/IBB module upon SC detection. In addition, notify it to OLEDB driver to disable OLEDB module. Change-Id: I2a9dc5b1ae8ece45c85b3992026c7f389fd4d135 Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
* | regulator: qpnp-labibb: Add support for notifier callbackKiran Gunda2017-02-22
| | | | | | | | | | | | | | | | | | | | Some drivers (e.g. OLEDB) would need to know about LAB_VREG_OK status from the LABIBB module. Hence, add support for the notifier callback so that required drivers can be notified about LAB_VREG_OK status. Change-Id: Ib60c94c7557ee6ffb7595dee5bd268bb76faaf6e Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
* | regulator: qpnp-regulator: correct various coding style issuesDavid Collins2017-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct warnings flagged by checkpatch. In particular, modify the following: - Use octal file permissions instead of symbolic. - Add 'const' to type of struct of_device_id variables. - Remove unnecessary out-of-memory error messages. - Change variables of type 'unsigned' to 'unsigned int'. - Restructure conditionals to avoid else after return/break. - Remove 'return' from the end of void functions. - Join strings that are wrapped across two lines. - Remove ';' from the end of a macro definition. - Update the REGULATOR_QPNP Kconfig entry and the device tree documentation to use the name: 'Qualcomm Technologies, Inc.' Change-Id: I9f2cde58929ae57667366bb886e65154d36dfd3d Signed-off-by: David Collins <collinsd@codeaurora.org>
* | regulator: cpr3: support LDO handling for different LDO typesTirupathi Reddy2016-12-12
| | | | | | | | | | | | | | | | | | | | An LDO300 regulator is used by the GPU rail on msmfalcon. This LDO is CPR managed and uses a different configuration/control scheme compared to Kryo LDO. Add support for this LDO in the CPR3 framework. CRs-Fixed: 1068294 Change-Id: Ia45152fe211f2ece1028c5cb978beebda86faba3 Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
* | regulator: msm: Add snapshot of the stub regulator driverDevesh Jhunjhunwala2016-03-23
| | | | | | | | | | | | | | | | | | This is a snapshot of the Documentation and header file for the stub regulator driver as of msm-3.18 kernel commit: 2642c0adc79c06c0f3225da0177e910a1cea8cb5 ("Merge "ARM: dts: msm: Add support for truly 720p command mode panel on msmgold"") Signed-off-by: Devesh Jhunjhunwala <deveshj@codeaurora.org>
* | regulator: core: put debugfs consumer handle when unregistering a regulatorDavid Collins2016-03-01
| | | | | | | | | | | | | | | | | | | | | | Ensure that regulator_put() is called on the core debugfs consumer pointer for a given regulator when the debugfs interface is no longer needed. This includes inside of the regulator_unregister() function as well as in the error return path of rdev_init_debugfs(). Change-Id: I10563ae1716f31bdc5840d22633fdbfe278330f1 Signed-off-by: David Collins <collinsd@codeaurora.org>
* | regulator: core: add regulator_list_corner_voltage functionDavid Collins2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a regulator_list_corner_voltage function for consumers that need to know the maximum absolute voltage that may be physically configured when a regulator is operating at a given voltage corner. Change-Id: Ide7a0b502796774fcad01f5cb5679f0938c72f96 Signed-off-by: David Collins <collinsd@codeaurora.org> [adharmap: fixed merge conflicts] Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org> Conflicts: include/linux/regulator/consumer.h
* | regulator: core: fix regulator bypass logicOsvaldo Banuelos2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | Since the regulator debugfs consumer does not call regulator_allow_bypass() on its regulator handles, regulators will not be placed on bypass mode even if all other consumers request for this. Fix this by introducing an open offset count that can be used to selectively disregard the debugfs consumer. Also, introduce a debugfs file to allow or disallow bypass mode on each regulator by leveraging on the new open offset count. Change-Id: If12534dac5e6b1c82acac9b5250137b4f816b922 Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
* | regulator: Call proxy-consumer functions for each regulator registeredDavid Collins2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a call to regulator_proxy_consumer_register() at the end of regulator_register() and a call to regulator_proxy_consumer_unregister() at the beginning of regulator_unregister(). These calls ensure that proxy consumer features may be used by any type of regulator regardless of the driver supporting it. Change-Id: Ia70da1df47042fa673c42f389136557f868d19a3 Signed-off-by: David Collins <collinsd@codeaurora.org> [abhimany: resolve trivial merge conflicts] Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org> [adharmap: resolve trivial merge conflicts] Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
* | regulator: Add regulator_bulk_set_voltageJustin Paupore2016-03-01
| | | | | | | | | | | | | | | | Add a convenience API to set the voltage on multiple consumers stored in a struct regulator_bulk_data[] in one API call. Change-Id: Iaeb5ba8c357a66f1401fb1e142bb03904e8e9c7c Signed-off-by: Justin Paupore <jpaupore@codeaurora.org>
* | regulator: add notifier event for regulator enableDavid Collins2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a notifier event which is triggered when a regulator is enabled. This can be used by a driver which must configure the hardware state whenever a given supply is enabled even if some other consumer was responsible for enabling the supply. Change-Id: Ic8363308b64953451dd01756e1bfdc2a64527096 Signed-off-by: David Collins <collinsd@codeaurora.org> Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org> [osvaldob: resolve trivial merge conflicts] Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org> [adharmap: 0x100 was taken by PRE_VOLTAGE_CHANGE use 0x1000 for ENABLE]
* | qpnp: Add snapshot of some qpnp, regulator and charger driversAbhijeet Dharmapurikar2016-03-01
|/ | | | | | | | | This snapshot is taken as of msm-3.18 commit 9da4ddc (Merge "clk: msm: clock-gcc: Associate gfx rail voting with gfx3d branch") Change-Id: Idd2f467f1f1863a156d1757589dfe78158f0e43f Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
* regulator: introduce min_dropout_uVSascha Hauer2015-10-16
| | | | | | | | | | | Many voltage Regulators need a input voltage that is higher than the output voltage. Allow to specify a minimum dropout voltage which will be used later to find the best input voltage for regulators. [Changed uv to uV for consistency and legibility -- broonie] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
*-----. Merge remote-tracking branches 'regulator/topic/qcom-smd', ↵Mark Brown2015-08-30
|\ \ \ \ | | | | | | | | | | | | | | | 'regulator/topic/qcom-spmi', 'regulator/topic/rk808', 'regulator/topic/stub' and 'regulator/topic/tol' into regulator-next
| | | | * regulator: core: Define regulator_set_voltage_triplet()Viresh Kumar2015-08-17
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Voltage tolerance isn't necessarily same on both sides of the target voltage and regulator_set_voltage_tol() wouldn't be suitable in such cases. Add another routine regulator_set_voltage_triplet(), which accepts target, min and max voltages as arguments. This first tries to set the voltage between the target voltage and the upper limit, then fall back on the full range. The idea behind this is to set regulator's voltage as close to the target voltage, as possible. Based on regulator_set_voltage_tol(). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * regulator: Add missing dummy definition for regulator_list_voltageSuzuki K. Poulose2015-07-10
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a build break when CONFIG_REGULATOR is not selected. e.g, on linux-next - 07102015: drivers/clk/tegra/clk-dfll.c: In function ‘find_lut_index_for_rate’: drivers/clk/tegra/clk-dfll.c:691:3: error: implicit declaration of function ‘regulator_list_voltage’ [-Werror=implicit-function-declaration] if (regulator_list_voltage(td->vdd_reg, td->i2c_lut[i]) == uv) ^ CC drivers/clocksource/mmio.o CC fs/proc/softirqs.o cc1: some warnings being treated as errors make[3]: *** [drivers/clk/tegra/clk-dfll.o] Error 1 make[2]: *** [drivers/clk/tegra] Error 2 make[1]: *** [drivers/clk] Error 2 make[1]: *** Waiting for unfinished jobs.... This should be pushed to 4.2 as we have the issue in 4.2-rc1, just that nobody uses it without the REGULATOR(yet). Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
*---. | | Merge remote-tracking branches 'regulator/topic/mt6311', ↵Mark Brown2015-08-30
|\ \ \| | | | | |/ | | |/| | | | | 'regulator/topic/ocp', 'regulator/topic/owner', 'regulator/topic/pfuze100' and 'regulator/topic/pwm' into regulator-next
| | * | regulator: Add over current protection (OCP) supportStephen Boyd2015-07-24
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | Some regulators can automatically shut down when they detect an over current event. Add an op (set_over_current_protection) and a DT property + constraint to support this capability. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * / regulator: mt6311: Add support for mt6311 regulatorHenry Chen2015-07-24
| |/ | | | | | | | | | | | | | | | | | | | | | | Add regulator support for mt6311. It has 2 regulaotrs - Buck and LDO, provide the related buck/ldo voltage data to the driver, and creates the regulator_desc table. Supported operations for Buck are enabled/disabled and voltage change, only enabled/disabled for LDO. Signed-off-by: Henry Chen <henryc.chen@mediatek.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* / regulator: da9211: support da9215James Ban2015-07-13
|/ | | | | | | 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>
*-. Merge remote-tracking branches 'regulator/topic/of', 'regulator/topic/pwm', ↵Mark Brown2015-06-22
|\ \ | | | | | | | | | 'regulator/topic/qcom' and 'regulator/topic/soft-start' into regulator-next
| | * regulator: Add docbook for soft startStephen Boyd2015-06-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docbook for these members is missing. Add them. Warning(include/linux/regulator/machine.h:147): No description found for parameter 'soft_start' Warning(include/linux/regulator/driver.h:197): No description found for parameter 'set_soft_start' Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'regulator/topic/lp8755', ↵Mark Brown2015-06-22
|\ \ \ \ | | |/ / | |/| | | | | | 'regulator/topic/max14577', 'regulator/topic/max77693', 'regulator/topic/max77843' and 'regulator/topic/max8973' into regulator-next
| | * | regulator: max8973: add mechanism to enable/disable through GPIOLaxman Dewangan2015-05-22
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | MAX8973 supports the voltage output enable/disable through its EN pin. This EN pin can be connected through GPIO from host processor. Add support to provide GPIO number from platform/DT and if it is valid GPIO then enable external control default. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | / regulator: Add input current limit supportStephen Boyd2015-06-12
| |/ |/| | | | | | | | | | | | | | | Some regulators can limit their input current (typically annotated as ilim). Add an op (set_input_current_limit) and a DT property + constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: Add soft start supportStephen Boyd2015-06-12
| | | | | | | | | | | | | | | | | | Some regulators support a "soft start" feature where the voltage ramps up slowly when the regulator is enabled. Add an op (set_soft_start) and a DT property + constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: Add pull down supportStephen Boyd2015-06-12
| | | | | | | | | | | | | | | | | | Some regulators need to be configured to pull down a resistor when the regulator is disabled. Add an op (set_pull_down) and a DT property + constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: Add system_load constraintStephen Boyd2015-06-12
|/ | | | | | | | | Some regulators have a fixed load that isn't captured by consumers that the kernel knows about. Add a constraint to support this. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*-----. Merge remote-tracking branches 'regulator/topic/mode', ↵Mark Brown2015-04-10
|\ \ \ \ | | | | | | | | | | | | | | | 'regulator/topic/notifier', 'regulator/topic/palmas', 'regulator/topic/qcom' and 'regulator/topic/stw481x' into regulator-next
| | * | | regulator: core: Add devres versions of notifier registrationCharles Keepax2015-03-05
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add devm_regulator_register_notifier, this adds the resource against the device for the consumer supply we are registering the notifier for. There seem to be few use-cases where this wouldn't be the users intention and this ensures the notifiers will always be removed at the correct time. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: Drop temporary regulator_set_optimum_mode wrapperBjorn Andersson2015-03-09
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: Rename regulator_set_optimum_modeBjorn Andersson2015-03-09
| |/ / | | | | | | | | | | | | | | | | | | | | | Rename the regulator_set_optimum_mode() function regulator_set_load() to better represent what's going on. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'regulator/topic/dbx500', ↵Mark Brown2015-04-10
|\ \ \ \ | | |/ / | |/| / | | |/ 'regulator/topic/load-op', 'regulator/topic/max77693' and 'regulator/topic/max8660' into regulator-next
| | * regulator: core: Introduce set_load opBjorn Andersson2015-02-23
| |/ | | | | | | | | | | | | | | Expose the requested load directly to the regulator implementation for hardware that does not support the normal enum based set_mode(). Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
*---. | Merge remote-tracking branches 'regulator/topic/act8865', ↵Mark Brown2015-04-10
|\ \ \| | | | | | | | | | | | | 'regulator/topic/arizona-ldo1', 'regulator/topic/arizona-micsupp' and 'regulator/topic/da9211' into regulator-next
| * | | regulator: act8865: Add act8600 supportZubair Lutfullah Kakakhel2015-03-06
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds act8600 support to the act8865 driver. VBUS and USB charger supported by this chip can be added later Tested on MIPS Creator CI20 Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown2015-04-10
|\ \ \
| * | | regulator: Defer lookup of supply to regulator_getBjorn Andersson2015-04-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of resolving regulator supplies during registration move this to the time of a consumer retrieving a handle. The benefit is that it's possible for one driver to register regulators with internal dependencies out of order. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: core: Fix space before TABGeert Uytterhoeven2015-02-24
| |/ / | | | | | | | | | | | | Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
* / / regulator: Fix documentation for regmap in the configAxel Lin2015-03-18
|/ / | | | | | | | | | | | | dev_get_regulator() does not exist, fix the typo. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'regulator/topic/max8649', ↵Mark Brown2015-02-08
|\ \ \ \ | | |_|/ | |/| | | | | | 'regulator/topic/mode', 'regulator/topic/mt6397', 'regulator/topic/pfuze100' and 'regulator/topic/qcom-rpm' into regulator-next
| | | * regulator: pfuze100-regulator: add pfuze3000 supportRobin Gong2015-01-09
| | |/ | |/| | | | | | | | | | | | | | | | Add pfuze3000 chip support. Signed-off-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * regulator: mt6397: Add support for MT6397 regulatorFlora Fu2014-12-24
| |/ | | | | | | | | | | | | Add MT6397 regulator driver. Signed-off-by: Flora Fu <flora.fu@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'regulator/topic/axp20x', ↵Mark Brown2015-02-08
|\ \ \ | | |/ | |/| | | | 'regulator/topic/da9211' and 'regulator/topic/fan53555' into regulator-next
| | * regulator: da9211: Add gpio control for enable/disable of buckJames Ban2015-01-28
| | | | | | | | | | | | | | | | | | | | | 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>
| | * regulator: da9211: fix unmatched of_nodeJames Ban2015-01-16
| |/ | | | | | | | | | | | | 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>