summaryrefslogtreecommitdiff
path: root/include/linux/regulator
AgeCommit message (Collapse)AuthorFilesLines
2016-05-17regulator: Silence build warnings from regulator_can_change_voltage()Mark Brown1-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>
2016-05-13Merge remote-tracking branches 'regulator/topic/max77686', ↵Mark Brown1-0/+5
'regulator/topic/max8973', 'regulator/topic/maxim', 'regulator/topic/palmas' and 'regulator/topic/pv88080' into regulator-next
2016-05-13Merge remote-tracking branches 'regulator/topic/can-change', ↵Mark Brown3-2/+8
'regulator/topic/constrain', 'regulator/topic/debugfs' and 'regulator/topic/doc' into regulator-next
2016-05-13Merge remote-tracking branches 'regulator/topic/abb', ↵Mark Brown1-0/+2
'regulator/topic/act8865', 'regulator/topic/as3722' and 'regulator/topic/axp20x' into regulator-next
2016-04-20regulator: core: Use a bitfield for continuous_voltage_rangeMark Brown1-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>
2016-04-13regulator: max8973: add support for junction thermal warningLaxman Dewangan1-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>
2016-03-30regulator: Deprecate regulator_can_change_voltage()Mark Brown1-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>
2016-03-28regulator: act8865: Pass of_node via act8865_regulator_dataMaarten ter Huurne1-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>
2016-03-23regulator: add missing description for set_over_current_protectionLuis de Bethencourt2-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>
2016-03-23regulator: add missing descriptions in regulator_descLuis de Bethencourt1-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>
2016-03-13Merge remote-tracking branches 'regulator/topic/discharge', ↵Mark Brown3-0/+34
'regulator/topic/fan53555', 'regulator/topic/gpio', 'regulator/topic/hi655x' and 'regulator/topic/lp872x' into regulator-next
2016-03-02regulator: helper: Add helper to configure active-discharge using regmapLaxman Dewangan1-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>
2016-03-02regulator: core: Add support for active-discharge configurationLaxman Dewangan2-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>
2016-02-29regulator: act8865: Rename platform_data field to init_dataMaarten ter Huurne1-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>
2016-02-05regulator: lp872x: Add enable GPIO pin supportPaul Kocialkowski1-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>
2016-01-12Merge remote-tracking branches 'regulator/topic/pv88090', ↵Mark Brown1-0/+2
'regulator/topic/qcom-smd', 'regulator/topic/tps6105x', 'regulator/topic/tps65086' and 'regulator/topic/tps65218' into regulator-next
2015-11-25regulator: tps65218: add support for LS3 current regulatorNikita Kiryanov1-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>
2015-11-17regulator: Make bulk API support optional suppliesBjorn Andersson1-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>
2015-10-16regulator: introduce min_dropout_uVSascha Hauer1-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>
2015-08-30Merge remote-tracking branches 'regulator/topic/qcom-smd', ↵Mark Brown1-0/+16
'regulator/topic/qcom-spmi', 'regulator/topic/rk808', 'regulator/topic/stub' and 'regulator/topic/tol' into regulator-next
2015-08-30Merge remote-tracking branches 'regulator/topic/mt6311', ↵Mark Brown3-0/+31
'regulator/topic/ocp', 'regulator/topic/owner', 'regulator/topic/pfuze100' and 'regulator/topic/pwm' into regulator-next
2015-08-17regulator: core: Define regulator_set_voltage_triplet()Viresh Kumar1-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>
2015-07-24regulator: Add over current protection (OCP) supportStephen Boyd2-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>
2015-07-24regulator: mt6311: Add support for mt6311 regulatorHenry Chen1-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>
2015-07-13regulator: da9211: support da9215James Ban1-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>
2015-07-10regulator: Add missing dummy definition for regulator_list_voltageSuzuki K. Poulose1-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>
2015-06-22Merge remote-tracking branches 'regulator/topic/of', 'regulator/topic/pwm', ↵Mark Brown2-0/+2
'regulator/topic/qcom' and 'regulator/topic/soft-start' into regulator-next
2015-06-22Merge remote-tracking branches 'regulator/topic/lp8755', ↵Mark Brown1-0/+4
'regulator/topic/max14577', 'regulator/topic/max77693', 'regulator/topic/max77843' and 'regulator/topic/max8973' into regulator-next
2015-06-15regulator: Add docbook for soft startStephen Boyd2-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>
2015-06-12regulator: Add input current limit supportStephen Boyd2-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>
2015-06-12regulator: Add soft start supportStephen Boyd2-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>
2015-06-12regulator: Add pull down supportStephen Boyd2-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>
2015-06-12regulator: Add system_load constraintStephen Boyd1-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>
2015-05-22regulator: max8973: add mechanism to enable/disable through GPIOLaxman Dewangan1-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>
2015-04-10Merge remote-tracking branches 'regulator/topic/mode', ↵Mark Brown1-3/+18
'regulator/topic/notifier', 'regulator/topic/palmas', 'regulator/topic/qcom' and 'regulator/topic/stw481x' into regulator-next
2015-04-10Merge remote-tracking branches 'regulator/topic/dbx500', ↵Mark Brown1-0/+3
'regulator/topic/load-op', 'regulator/topic/max77693' and 'regulator/topic/max8660' into regulator-next
2015-04-10Merge remote-tracking branches 'regulator/topic/act8865', ↵Mark Brown1-0/+14
'regulator/topic/arizona-ldo1', 'regulator/topic/arizona-micsupp' and 'regulator/topic/da9211' into regulator-next
2015-04-10Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown2-1/+2
2015-04-01regulator: Defer lookup of supply to regulator_getBjorn Andersson1-0/+1
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>
2015-03-18regulator: Fix documentation for regmap in the configAxel Lin1-1/+1
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>
2015-03-09regulator: Drop temporary regulator_set_optimum_mode wrapperBjorn Andersson1-7/+0
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-03-09regulator: Rename regulator_set_optimum_modeBjorn Andersson1-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>
2015-03-06regulator: act8865: Add act8600 supportZubair Lutfullah Kakakhel1-0/+14
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>
2015-03-05regulator: core: Add devres versions of notifier registrationCharles Keepax1-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>
2015-02-24regulator: core: Fix space before TABGeert Uytterhoeven1-1/+1
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-02-23regulator: core: Introduce set_load opBjorn Andersson1-0/+3
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>
2015-02-08Merge remote-tracking branches 'regulator/topic/max8649', ↵Mark Brown2-0/+63
'regulator/topic/mode', 'regulator/topic/mt6397', 'regulator/topic/pfuze100' and 'regulator/topic/qcom-rpm' into regulator-next
2015-02-08Merge remote-tracking branches 'regulator/topic/axp20x', ↵Mark Brown1-0/+2
'regulator/topic/da9211' and 'regulator/topic/fan53555' into regulator-next
2015-02-08Merge remote-tracking branch 'regulator/topic/dt-cb' into regulator-nextMark Brown1-0/+13
2015-02-04regulator: Fix build breakage on !REGULATORKrzysztof Kozlowski1-3/+10
Add missing stubs for regulator_suspend_prepare() and regulator_suspend_finish() to fix exynos_defconfig build without REGULATOR: arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_finish': arch/arm/mach-exynos/suspend.c:537: undefined reference to `regulator_suspend_finish' arch/arm/mach-exynos/built-in.o: In function `exynos_suspend_prepare': arch/arm/mach-exynos/suspend.c:520: undefined reference to `regulator_suspend_prepare' make: *** [vmlinux] Error 1 Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reported-by: Joerg Roedel <joro@8bytes.org> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>