summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max14577.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: max14577: Reduce duplication of regulator_desc initializersKrzysztof Kozlowski2015-04-271-80/+48
| | | | | | | | | Replace duplicated initializers in arrays of struct 'regulator_desc' with macro. Generated object is the same but each type of regulator is described only once. Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: max14577: Use regulator_nodes/of_match in the descriptorBeomho Seo2014-12-221-48/+14
| | | | | | | | | | This patch is add regulator_nodes/ofmatch in the regulator descriptor for using information from DT instead of specific codes. That will be used regulation_of_get_init_data function for get regulator property on device tree. Using that make driver simpler. Signed-off-by: Beomho Seo <beomho.seo@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* regulator/mfd: max14577: Export symbols for calculating charger currentKrzysztof Kozlowski2014-09-241-76/+4
| | | | | | | | | | | | | | | | | | 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>
* regulator: max14577: Add support for MAX77836 regulatorsKrzysztof Kozlowski2014-04-231-35/+242
| | | | | | | | | | | | | | | 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>
*-. Merge remote-tracking branches 'regulator/topic/doc', ↵Mark Brown2014-03-261-7/+1
|\ \ | | | | | | | | | '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
| | * regulator: max14577: Remove unused state container definitionKrzysztof Kozlowski2014-02-031-7/+1
| |/ | | | | | | | | | | | | | | | | 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>
* | regulator: max14577: Fix invalid return value on DT parse successKrzysztof Kozlowski2014-02-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | regulator: max14577: Add missing of_node_putKrzysztof Kozlowski2014-02-051-2/+3
|/ | | | | | | | 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>
* regulator: max14577: Add module alias to support module auto-loadingAxel Lin2013-12-231-0/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: max14577: Add regulator driver for Maxim 14577Krzysztof Kozlowski2013-12-181-0/+272
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>
OpenPOWER on IntegriCloud