summaryrefslogtreecommitdiff
path: root/drivers/regulator/axp20x-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-23regulator: axp20x: Fix GPIO LDO enable value for AXP22xChen-Yu Tsai1-2/+2
The enable/disable values for GPIO LDOs are reversed. It seems no one noticed as AXP22x support was introduced recently, and no one was using the GPIO LDOs, either because no designs actually use them or board support hasn't caught up. Fixes: 1b82b4e4f954 ("regulator: axp20x: Add support for AXP22X regulators") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-11-04Merge remote-tracking branches 'regulator/topic/act8865', ↵Mark Brown1-4/+50
'regulator/topic/anatop', 'regulator/topic/arizona', 'regulator/topic/axp20x' and 'regulator/topic/bcm590xx' into regulator-next
2015-10-05regulator: axp20x: set supply names for AXP22X DC1SW/DC5LDO internallyChen-Yu Tsai1-4/+50
The DC1SW and DC5LDO regulators in the AXP22X are internally chained to DCDC1 and DCDC5, hence the names. The original bindings used the parent regulator names for the supply regulator property. Since they are internally connected, the relationship should not be represented in the device tree, but handled internally by the driver. This patch has the driver remember the regulator names for the parent DCDC1/DCDC5, and use them as supply names for DC1SW/DC5LDO. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-29regulator: axp20x: Fix enable bit indexes for DCDC4 and DCDC5Chen-Yu Tsai1-2/+2
The enable bit indexes for DCDC4 and DCDC5 regulators are off by 1. We haven't run into any problems with this since either the regulators aren't defined in the DT and aren't used, or all the DCDC regulators have the "always-on" property set, as they are almost always used for system critical loads. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-04regulator: axp20x: Add module aliasIan Campbell1-0/+1
This allows the module to be autoloaded. Together with 07949bf9c63c ("cpufreq: dt: allow driver to boot automatically") this is sufficient to allow a modular kernel (such as Debian's) to enable cpufreq on a Cubietruck. Signed-off-by: Ian Campbell <ijc@hellion.org.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-05-13regulator: axp20x: Add support for AXP22X regulatorsBoris BREZILLON1-0/+96
Add AXP22X regulator definitions and variant id associations. This introduces a new "switch" type output for one of the regulators. It is a switchable secondary output of one regulator, with the same voltage level as the primary output. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> [wens@csie.org: Moved variant choosing to multi family support patch] [wens@csie.org: Add dc-dc work frequency range] [wens@csie.org: Add "switch" type output regulator DC1SW] Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-05-13regulator: axp20x: Prepare support for multiple AXP chip familiesBoris BREZILLON1-49/+94
Rework the AXP20X_ macros and probe function to support the several chip families, so that each family can define it's own set of regulators. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> [wens@csie.org: Support different DC-DC work frequency ranges] Signed-off-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
2015-01-09regulator: axp20x: Migrate to regulator core's simplified DT parsing codeChen-Yu Tsai1-36/+8
A common simplified DT parsing code for regulators was introduced in commit a0c7b164ad11 ("regulator: of: Provide simplified DT parsing method"). This is very similar to our own code, so get rid of ours and use the common code. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-09regulator: axp20x: Fill regulators_node and of_match descriptor fieldsChen-Yu Tsai1-20/+29
This patch fills the DT related fields in the regulator descriptors, which can then be used by the regulator core's simplified DT code. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20regulator: drop owner assignment from platform_driversWolfram Sang1-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>
2014-09-23regulator: axp20x: Use parent device as regulator configuration deviceMaxime Ripard1-1/+1
The current device used for the regulator configuration is the child device created by the MFD driver. This means that it doesn't have any of_node pointing to it, and whenever we register the regulators, it will not look into the regulator supply in the DT, hence requiring to provide regulator aliases in the MFD driver. We can easily fix that by using the parent device in our configuration, which has a DT node associated to it, and will allow a DT lookup. Eventually, we will be able to remove the aliases in the MFD driver. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-06-01regulator: axp20x: Use regulator_map_voltage_ascend for LDO4Axel Lin1-0/+1
The voltages in axp20x_ldo4_data table are in ascendant order, so use regulator_map_voltage_ascend. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-19regulator: AXP20x: fix wrong call to of_find_node_by_nameBoris BREZILLON1-1/+1
The of_find_node_by_name function will search for a DT node named "regulators" after the provided np node, but will not ensure that this node is a child of np. This might result in retrieving a "regulators" node that is not related to the axp20x PMIC. Signed-off-by: Boris BREZILLON <boris.brezillon@free-electrons.com> Acked-by: Carlo Caione <carlo@caione.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: AXP20x: Add support for regulators subsystemCarlo Caione1-0/+285
AXP202 and AXP209 come with two synchronous step-down DC-DCs and five LDOs. This patch introduces basic support for those regulators. Signed-off-by: Carlo Caione <carlo@caione.org> Signed-off-by: Mark Brown <broonie@linaro.org>