summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max14577.c
AgeCommit message (Collapse)Author
2014-09-24regulator/mfd: max14577: Export symbols for calculating charger currentKrzysztof Kozlowski
This patch prepares for changing the max14577 charger driver to allow configuring battery-dependent settings from DTS. The patch moves from regulator driver to MFD core driver and exports: - function for calculating register value for charger's current; - table of limits for chargers (MAX14577, MAX77836). Previously they were used only by the max14577 regulator driver. In next patch the charger driver will use them as well. Exporting them will reduce unnecessary code duplication. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-04-23regulator: max14577: Add support for MAX77836 regulatorsKrzysztof Kozlowski
Add support for MAX77836 chipset and its additional two LDO regulators. These LDO regulators are controlled by the PMIC block with additional regmap (different I2C slave address). The MAX77836 charger and safeout regulators are almost identical to MAX14577. The registers layout is the same, except values for charger's current. The patch adds simple mapping between device type and supported current by the charger regulator. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Mark Brown <broonie@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2014-03-26Merge remote-tracking branches 'regulator/topic/doc', ↵Mark Brown
'regulator/topic/enable', 'regulator/topic/fan53555', 'regulator/topic/fixed', 'regulator/topic/gpio', 'regulator/topic/lp3971', 'regulator/topic/lp872x' and 'regulator/topic/max14577' into regulator-next
2014-02-22regulator: max14577: Fix invalid return value on DT parse successKrzysztof Kozlowski
This fixes bug introduced in 667a6b7a (regulator: max14577: Add missing of_node_put). The DTS parsing function returned number of matched regulators as success status which then was compared against 0 in probe. Result was a probe fail after successful parsing the DTS: max14577-regulator: probe of max14577-regulator failed with error 2 Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviwed-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-05regulator: max14577: Add missing of_node_putKrzysztof Kozlowski
Decrease the reference count for 'regulators' device_node, obtained by of_get_child_by_name(). Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-02-03regulator: max14577: Remove unused state container definitionKrzysztof Kozlowski
Remove the "struct max14577_regulator" because this is not used anywhere. It should be removed earlier along with changing the driver after review on the mailing lists. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-23regulator: max14577: Add module alias to support module auto-loadingAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-18regulator: max14577: Add regulator driver for Maxim 14577Krzysztof Kozlowski
MAX14577 chip is a multi-function device which includes MUIC, charger and voltage regulator. The driver is located in drivers/mfd. This patch adds regulator driver for MAX14577 chip. There are two regulators in this chip: 1. Safeout LDO with constant voltage output of 4.9V. It can be only enabled or disabled. 2. Current regulator for the charger. It provides current from 90mA up to 950mA. Driver supports Device Tree. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>