summaryrefslogtreecommitdiffstats
path: root/include/linux/regulator
Commit message (Collapse)AuthorAgeFilesLines
* scripts/spelling.txt: add "disble(d)" pattern and fix typo instancesMasahiro Yamada2017-03-091-1/+1
| | | | | | | | | | | | | | | | Fix typos and add the following to the scripts/spelling.txt: disble||disable disbled||disabled I kept the TSL2563_INT_DISBLED in /drivers/iio/light/tsl2563.c untouched. The macro is not referenced at all, but this commit is touching only comment blocks just in case. Link: http://lkml.kernel.org/r/1481573103-11329-20-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* regulator: Fix regulator_get_error_flags() signature mismatchDavid Lechner2016-12-051-1/+2
| | | | | | | | | The function signature of does not match regulator_get_error_flags() when CONFIG_REGULATOR is not defined vs. when it is not defined. This makes both declarations match to prevent compiler errors. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: core: Add new API to poll for error conditionsAxel Haslam2016-11-042-0/+30
| | | | | | | | | | | | Regulator consumers can receive event notifications when errors are reported to the driver, but currently, there is no way for a regulator consumer to know when the error is over. To allow a regulator consumer to poll for error conditions add a new API: regulator_get_error_flags. Signed-off-by: Axel Haslam <ahaslam@baylibre.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'regulator/topic/of', ↵Mark Brown2016-09-301-2/+8
|\ \ | | | | | | | | | 'regulator/topic/pv88080', 'regulator/topic/rk808', 'regulator/topic/set-voltage' and 'regulator/topic/tps65218' into regulator-next
| | * regulator: core: Add set_voltage_time opMatthias Kaehlcke2016-09-161-2/+8
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new op is analogous to set_voltage_time_sel. It can be used by regulators which don't have a table of discrete voltages. The function returns the time for the regulator output voltage to stabilize after being set to a new value, in microseconds. If the op is not set a default implementation is used to calculate the delay. This change also removes the ramp_delay calculation in the PWM regulator, since the driver now uses the core code for the calculation of the delay. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: Remove support for optional supplies in the bulk APIBjorn Andersson2016-08-161-3/+0
|/ | | | | | | | | | The patch was based on my missinterpretation of the API and only accidentally worked for me. Let's clean it out to not confuse others. This reverts commit 3ff3f518a135fa4592fe2817e9ac2cce1fa23dc2. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'regulator/topic/fixed', ↵Mark Brown2016-07-201-0/+52
|\ \ | | | | | | | | | 'regulator/topic/headers', 'regulator/topic/lp837x', 'regulator/topic/max8973' and 'regulator/topic/mt6323' into regulator-next
| | * regulator: mt6323: Add support for MT6323 regulatorChen Zhong2016-07-181-0/+52
| |/ | | | | | | | | | | | | | | | | | | The MT6323 is a regulator found on boards based on MediaTek MT7623 and probably other SoCs. It is a so called pmic and connects as a slave to SoC using SPI, wrapped inside the pmic-wrapper. Signed-off-by: Chen Zhong <chen.zhong@mediatek.com> Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'regulator/topic/act8865', ↵Mark Brown2016-07-202-7/+4
|\ \ \ | |_|/ |/| | | | | 'regulator/topic/can-change-voltage', 'regulator/topic/da9210' and 'regulator/topic/da9211' into regulator-next
| | * regulator: da9211: add descriptions for da9212/da9214James Ban2016-06-291-1/+4
| |/ |/| | | | | | | | | | | 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>
| * regulator: Remove regulator_can_change_voltage()Mark Brown2016-06-091-6/+0
|/ | | | | | | | | | | | | | | | There is little obvious use case for a regualtor driver to know if it is possible to vary voltages at all by itself. If a consumer needs to limit what voltages it tries to set based on the system configuration then it will need to enumerate the possible voltages, and without that even if it is possible to change voltages that doesn't mean that constraints or other consumers will allow whatever change the driver is trying to do at a given time. It doesn't even indicate if _set_voltage() calls will work as noop _set_voltage() calls return success. There were no users of this API that weren't abusing it and now they're all gone so remove the API. Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: Silence build warnings from regulator_can_change_voltage()Mark Brown2016-05-171-2/+2
| | | | | | | | | | | | | Cut down on noise for mainstream users of the API and people doing build testing by dropping the deprecated flag from regulator_can_change_voltage() as it triggers even on the EXPORT_SYMBOL_GPL() which affects all builds rather than just the remaining drivers with calls to it (for which fixes are currently pending). The function remains deprecated and is expected to be removed entirely in v4.8. Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'regulator/topic/max77686', ↵Mark Brown2016-05-131-0/+5
|\ \ | | | | | | | | | 'regulator/topic/max8973', 'regulator/topic/maxim', 'regulator/topic/palmas' and 'regulator/topic/pv88080' into regulator-next
| | * regulator: max8973: add support for junction thermal warningLaxman Dewangan2016-04-131-0/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver MAX8973 supports the driver for Maxim PMIC MAX77621. MAX77621 supports the junction temp warning at 120 degC and 140 degC which is configurable. It generates alert signal when junction temperature crosses these threshold. MAX77621 does not support the continuous temp monitoring of junction temperature. It just report whether junction temperature crossed the threshold or not. Add support to - Configure junction temp warning threshold via DT property to generate alert when it crosses the threshold. - Add support to interrupt the host from this device when alert occurred. - read the junction temp via thermal framework. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'regulator/topic/can-change', ↵Mark Brown2016-05-133-2/+8
|\ \ \ \ | | | |/ | | |/| | | | | 'regulator/topic/constrain', 'regulator/topic/debugfs' and 'regulator/topic/doc' into regulator-next
| | | * regulator: add missing description for set_over_current_protectionLuis de Bethencourt2016-03-232-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Over current protection is missing descriptions for documentation. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * regulator: add missing descriptions in regulator_descLuis de Bethencourt2016-03-231-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | Members csel_reg and csel_mask of the regulator_desc struct are missing descriptions for documentation. Adding them. Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: Deprecate regulator_can_change_voltage()Mark Brown2016-03-301-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All current users of regulator_can_change_voltage() are abusing it, using it to wrap a call to regulator_set_voltage() on probe without any alternative handling for fixed voltages. Drivers should only be using regulator_set_voltage() if they need to vary voltages at runtime, fixed voltages should normally be set via machine constraints, and calling regulator_set_voltage() on a regulator which can't be varied will succeed if the current voltage is within the range requested so users shouldn't worry if they have permission to vary normally. Deprecate the API to try to stop any new users appearing while we fix the current callers. Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'regulator/topic/abb', ↵Mark Brown2016-05-131-0/+2
|\ \ \ | | |/ | |/| | | | 'regulator/topic/act8865', 'regulator/topic/as3722' and 'regulator/topic/axp20x' into regulator-next
| | * regulator: act8865: Pass of_node via act8865_regulator_dataMaarten ter Huurne2016-03-281-0/+2
| |/ | | | | | | | | | | | | | | This makes the code easier to read and it avoids a dynamic memory allocation. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: core: Use a bitfield for continuous_voltage_rangeMark Brown2016-04-201-1/+1
|/ | | | | | | | Using a bitfield enables the compiler to lay out the structure more efficiently when we have other boolean flags since multiple values can be included in a single byte. Signed-off-by: Mark Brown <broonie@kernel.org>
*-----. Merge remote-tracking branches 'regulator/topic/discharge', ↵Mark Brown2016-03-133-0/+34
|\ \ \ \ | | | | | | | | | | | | | | | 'regulator/topic/fan53555', 'regulator/topic/gpio', 'regulator/topic/hi655x' and 'regulator/topic/lp872x' into regulator-next
| | | | * regulator: lp872x: Add enable GPIO pin supportPaul Kocialkowski2016-02-051-0/+5
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | LP872x regulators are made active via the EN pin, which might be hooked to a GPIO. This adds support for driving the GPIO high when the driver is in use. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: helper: Add helper to configure active-discharge using regmapLaxman Dewangan2016-03-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper function to set the state of active-discharge of regulator using regmap. The HW regulator driver can directly use this by providing the necessary information in the regulator descriptor. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: core: Add support for active-discharge configurationLaxman Dewangan2016-03-022-0/+15
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Add support to enable/disable active discharge of regulator via machine constraints. This configuration is done when setting machine constraint during regulator register and if regulator driver implemented the callback ops. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | regulator: act8865: Rename platform_data field to init_dataMaarten ter Huurne2016-02-291-2/+2
|/ / | | | | | | | | | | | | Make the field name match its type. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'regulator/topic/pv88090', ↵Mark Brown2016-01-121-0/+2
|\ \ \ | | |/ | |/| | | | 'regulator/topic/qcom-smd', 'regulator/topic/tps6105x', 'regulator/topic/tps65086' and 'regulator/topic/tps65218' into regulator-next
| | * regulator: tps65218: add support for LS3 current regulatorNikita Kiryanov2015-11-251-0/+2
| |/ | | | | | | | | | | | | | | Add support for TPS65218 LS3 current regulator, which is capable of 4 current input limit modes: 100, 200, 500, and 1000 uA. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: Make bulk API support optional suppliesBjorn Andersson2015-11-171-0/+3
|/ | | | | | | | Make it possible to use the bulk API with optional supplies, by allowing the consumer to marking supplies as optional in the regulator_bulk_data. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: introduce min_dropout_uVSascha Hauer2015-10-161-0/+2
| | | | | | | | | | | 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-301-0/+16
|\ \ \ \ | | | | | | | | | | | | | | | '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-171-0/+10
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-101-0/+6
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-303-0/+31
|\ \ \ \ \ | | | |/ / | | | | / | | | |/ | | |/| '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-242-0/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | 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-241-0/+29
| |/ | | | | | | | | | | | | | | | | | | | | | | 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-131-9/+10
|/ | | | | | | 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-222-0/+2
|\ \ | | | | | | | | | 'regulator/topic/qcom' and 'regulator/topic/soft-start' into regulator-next
| | * regulator: Add docbook for soft startStephen Boyd2015-06-152-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-221-0/+4
|\ \ \ \ | | |/ / | |/| | | | | | '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-221-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-122-0/+5
| |/ |/| | | | | | | | | | | | | | | 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-122-0/+3
| | | | | | | | | | | | | | | | | | 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-122-0/+7
| | | | | | | | | | | | | | | | | | 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-121-0/+3
|/ | | | | | | | | 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-101-3/+18
|\ \ \ \ | | | | | | | | | | | | | | | '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-051-0/+16
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-091-7/+0
| | | | | | | | | | | | | | | | | | | | 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-091-3/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | 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-101-0/+3
|\ \ \ \ | | |/ / | |/| / | | |/ 'regulator/topic/load-op', 'regulator/topic/max77693' and 'regulator/topic/max8660' into regulator-next
OpenPOWER on IntegriCloud