summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/cpcap-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-07regulator: cpcap: Spelling s/configuraion/configuration/Geert Uytterhoeven1-1/+1
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-18regulator: cpcap: Convert to use of_device_get_match_dataAxel Lin1-8/+4
Use of_device_get_match_data to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-03-18regulator: cpcap: Remove unneeded init_data settingAxel Lin1-3/+0
This driver is using regulator core's simplified DT parsing code, so regulator will call regulator_of_get_init_data() to get init_data. No need to set config.init_data. In additional, current code does not properly set the init_data setting, so just remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26regulator: cpcap: Constify omap4_regulators and xoom_regulatorsAxel Lin1-2/+2
They should never change, make them const. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-26regulator: cpcap: Remove unused vsel_shift from struct cpcap_regulatorAxel Lin1-52/+50
This driver uses regulator_get/set_voltage_sel_regmap so it does not use vsel_shift. Actually, vsel_shift can be calculated by vsel_mask setting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-24regulator: Add support for CPCAP regulators on Motorola Xoom devices.Peter Geis1-0/+80
Added support for the CPCAP power management regulator functions on Tegra based Motorola Xoom devices. Added sw2_sw4 value tables, which provide power to the Tegra core and aux devices. Added the Xoom init tables and device tree compatibility match. Signed-off-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-07-24regulator: Add sw2_sw4 voltage table to cpcap regulator.Peter Geis1-0/+23
SW2 and SW4 use a shared table to provide voltage to the cpu core and devices on Tegra hardware. Added this table to the cpcap regulator driver as the first step to supporting this device on Tegra. Signed-off-by: Peter Geis <pgwipeout@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-04-20regulator: Don't return or expect -errno from of_map_mode()Douglas Anderson1-1/+1
In of_get_regulation_constraints() we were taking the result of of_map_mode() (an unsigned int) and assigning it to an int. We were then checking whether this value was -EINVAL. Some implementers of of_map_mode() were returning -EINVAL (even though the return type of their function needed to be unsigned int) because they needed to signal an error back to of_get_regulation_constraints(). In general in the regulator framework the mode is always referred to as an unsigned int. While we could fix this to be a signed int (the highest value we store in there right now is 0x8), it's actually pretty clean to just define the regulator mode 0x0 (the lack of any bits set) as an invalid mode. Let's do that. Fixes: 5e5e3a42c653 ("regulator: of: Add support for parsing initial and suspend modes") Suggested-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17regulator: cpcap: Add OF mode mappingSebastian Reichel1-0/+13
Add device tree mode mapping capabilities to the cpcap driver. Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-17regulator: cpcap: Fix standby modeSebastian Reichel1-3/+5
The original patch from Tony uses standby mode bit inverted, which is not correct. This fixes all instances in the driver code for get & set mode. This did not yet make problems, since mode has not been changed by any mainline driver so far. Fixes: 0ad4c07edd41 ("regulator: cpcap: Add basic regulator support") Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2017-02-04regulator: cpcap: Add basic regulator supportTony Lindgren1-0/+464
Many Motorola phones like droid 4 are using a custom PMIC called CPCAP or 6556002. This PMIC is used with several SoCs, I've noticed at least omap3, omap4 and Tegra2 based Motorola phones and tablets using it. Cc: devicetree@vger.kernel.org Cc: Marcel Partap <mpartap@gmx.net> Cc: Michael Scott <michael.scott@linaro.org> Cc: Rob Herring <robh@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@kernel.org>