aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/pbias-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-31regulator: pbias: Select voltage table based on max-voltageRavikumar Kattekola1-3/+18
Reference manuals of OMAP5x and DRA7x have been updated to reflect the PBIAS regulator max-voltage as 3.3V instead of 3.0V, while OMAP3x and OMAP4x are still quoting 3.0V. So, as of now, the pbias driver needs to support both 3.0V and 3.3V IO voltage based on the max-voltage supported by the PBIAS regulator. Document reference: SWPU249AF - OMAP543x Technical reference manual - August 2016 SPRUI30C – DRA75x, DRA74x Technical reference manual November 2016 Tested on: DRA75x PG 2.0 REV H EVM Signed-off-by: Ravikumar Kattekola <rk@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-01-31regulator: pbias-regulator: constify regulator_ops structureBhumika Goyal1-1/+1
Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/pbias-regulator.o text data bss dec hex filename 2545 624 0 3169 c61 regulator/pbias-regulator.o File size after: drivers/regulator/pbias-regulator.o text data bss dec hex filename 2801 368 0 3169 c61 regulator/pbias-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-09-21Merge remote-tracking branches 'regulator/fix/anatop', 'regulator/fix/gpio', 'regulator/fix/pbias', 'regulator/fix/tpx65218' and 'regulator/fix/vexpress' into regulator-linusMark Brown1-6/+50
2015-09-03regulator: pbias: program pbias register offset in pbias driverKishon Vijay Abraham I1-6/+50
Add separate compatible strings for every platform and populate the pbias register offset in the driver data. This helps avoid depending on the dt for pbias register offset. Also update the dt binding documentation for the new compatible strings. Suggested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14regulator: pbias: Fix broken pbias disable functionalityKishon Vijay Abraham I1-0/+5
regulator_disable of pbias always writes '0' to the enable_reg. However actual disable value of pbias regulator is not always '0'. Fix it by populating the disable_val in pbias_reg_info for the various platforms and assign it to the disable_val of pbias regulator descriptor. This will be used by regulator_disable_regmap while disabling pbias regulator. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.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-06-02regulator: pbias: remove unnecessary OOM messagesJingoo Han1-3/+1
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-15regulator: pbias: Convert to use regulator_[enable|is_enabled]_regmapAxel Lin1-22/+3
Since commit ca5d1b3524b4d "regulator: helpers: Modify helpers enabling multi-bit control", we can set enable_val setting for device that use multiple bits for control when using regmap enable/disable/bypass ops. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: pbias: Convert to use regmap helper functionsAxel Lin1-55/+19
This patch converts this driver to use the regmap helper functions provided by regulator core. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-14regulator: pbias: Fix is_enabled callback implementationAxel Lin1-1/+1
The is_enabled implementation is wrong in some cases: e.g. for pbias_mmc_omap5: enable_mask is : BIT(27) | BIT(25) | BIT(26) However, pbias_regulator_enable() only sets BIT(27) | BIT(26) bits. So is_enabled callback will always return false in this case. Fix the logic to compare the register value with info->enable rather than info->enable_mask. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Balaji T K <balajitk@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-04regulator: add pbias regulator supportBalaji T K1-0/+255
pbias register controls internal power supply to sd card i/o pads in most OMAPs (OMAP2-5, DRA7). Control bits for selecting voltage level and enabling/disabling are in the same PBIAS register. Signed-off-by: Balaji T K <balajitk@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Mark Brown <broonie@linaro.org> Tested-by: Florian Vaussard <florian.vaussard@epfl.ch> Tested-by: Stefan Roese <sr@denx.de> Signed-off-by: Chris Ball <chris@printf.net>