aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/tps6586x-regulator.c
AgeCommit message (Collapse)Author
2013-06-24mfd: tps6586x: correct device name of the regulator cellMarc Dietrich
Change the device name of the regulator function to the one chosen for MODULE_ALIAS. This fixes kernel auto-module loading for the regulator function. Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-04-28Merge remote-tracking branch 'regulator/topic/tps6586x' into v3.9-rc8Mark Brown
2013-04-23regulator: tps6586x: Convert to use regulator_map_voltage_ascendAxel Lin
All regulators have ascendant voltage list in this driver. Thus use regulator_map_voltage_ascend is more efficient than the default regulator_map_voltage_iterate. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04regulator: tps6586x: Use dev_err rather than dev_warn for error messageAxel Lin
tps6586x_regulator_set_slew_rate() returns -EINVAL when having slew rate settings for other than SM0/1, thus use dev_err rather than dev_warn. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-04regulator: tps6586x: (cosmetic) simplify a conditionalGuennadi Liakhovetski
of_node_put() is called on either branch of a conditional, simplify the code by only calling it once. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-24regulator: tps6586x: Use apply_[reg|bit] with regmap based voltage_sel ↵Axel Lin
operations Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10Merge remote-tracking branch 'regulator/topic/tps6586x' into regulator-nextMark Brown
2012-11-27regulator: tps6586x: fix build warning in debug buildLaxman Dewangan
When building the driver in debug mode, it generates warning as drivers/regulator/tps6586x-regulator.c: In function 'tps6586x_regulator_probe': drivers/regulator/tps6586x-regulator.c:392:9: warning: 'id' is used uninitialized in this function [-Wuninitialized] Fix this warning. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reported-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20regulator: remove use of __devexitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20Merge branch 'topic/tps6586x' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-hotplug Conflicts: drivers/regulator/tps6586x-regulator.c
2012-11-20regulator: remove use of __devinitBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-20regulator: remove use of __devexit_pBill Pemberton
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-15mfd: tps6586x: move regulator dt parsing to regulator driverLaxman Dewangan
Moving regulator node parsing to regulator driver in place of parsing it on mfd driver. The motivation for this change are: - MFD core driver should not depends on regulator and able to instantiate device without regulator. - The API for matching regulators are in regulator core and it is good that regulator driver only calls this API. - Regulator specific support should be in regulator driver only to ease any enhancement/modification for regulators. - The regulator driver is now registered as mfd sub device and all regulator registration is done from single probe call. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-28Merge remote-tracking branches 'regulator/topic/core', ↵Mark Brown
'regulator/topic/bypass', 'regulator/topic/tol', 'regulator/topic/drivers' and 'regulator/topic/tps6586x' into regulator-next
2012-09-06regulator: tps6586x: add support for SYS railLaxman Dewangan
Device have SYS rail which is always ON. It is system power bus. LDO5 and LDO_RTC get powered through this rail internally. Add support for this rail and make the LDO5/LDO_RTC supply by it. Update document accordingly. [swarren: Instantiate the sys regulator from board-harmony-power.c to avoid regression.] Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-28regulator: tps6586x: Convert to ↵Axel Lin
regulator_[enable|disable|is_enabled|get_voltage_sel]_regmap Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-07regulator: tps6586x: correct vin pin for sm0/sm1/sm2Laxman Dewangan
As per datasheet, the vin pin for the regulator is named as vin_sm0, vin_sm1, vin_sm2 for sm0, sm1 and sm2 respectively. Correcting the names in driver and documentation to match with datasheet. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reported-by: Stephen Warren <swarren@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-13regulator: tps6586x: add support for input supplyLaxman Dewangan
There is multiple voltage input pins on device which takes the voltage input for different voltage regulator. Support to configure the voltage input supplied by different regulator for each regulators. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-08regulator: tps6586x: Convert to regulator_list_voltage_tableAxel Lin
Also adds tps6586x_ldo0_voltages mapping table for LDO0, so we can remove the hack in tps6586x_list_voltage() and convert it to regulator_list_voltage_table. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-04tps6586x: Add device tree supportThierry Reding
This commit adds device tree support for the TPS6586x regulator. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-10Merge tag 'v3.4-rc2' into regulator-driversMark Brown
Linux 3.4-rc2 contains some fixes that further patches depend upon.
2012-04-09regulator: core: Use a struct to pass in regulator runtime configurationMark Brown
Rather than adding new arguments to regulator_register() every time we want to add a new bit of dynamic information at runtime change the function to take these via a struct. By doing this we avoid needing to do further changes like the recent addition of device tree support which required each regulator driver to be updated to take an additional parameter. The regulator_desc which should (mostly) be static data is still passed separately as most drivers are able to configure this statically at build time. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Merge tps6586x_regulator_ldo_ops and tps6586x_regulator_dvm_opsAxel Lin
Now all the callback implementation are the same for both ldo and dvm regulator_ops, merge them to tps6586x_regulator_ops. Also rename tps6586x_ldo_list_voltage to tps6586x_list_voltage. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert tps6586x to set_voltage_selAxel Lin
Convert both tps6586x_[ldo|dvm]_set_voltage to one set_voltage_sel callback. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01regulator: Convert tps6586x to get_voltage_selAxel Lin
This also fixes a bug, LDO0 has minimal voltage 1.2V rather than 1.25V. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-26regulator: tps6586x: Fix list minimal voltage setting for LDO0Axel Lin
According to the datasheet, LDO0 has minimal voltage 1.2V rather than 1.25V. Table 3-39. VLDO0[2:0] Settings VLDOx[2:0] VOUT (V) VLDOx[2:0] VOUT (V) 000 1.20 100 2.70 001 1.50 101 2.85 010 1.80 110 3.10 011 2.50 111 3.30 Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-11regulator: tps6586x: fix typo in debug messageThierry Reding
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23regulator: pass additional of_node to regulator_register()Rajendra Nayak
With device tree support for regulators, its needed that the regulator_dev->dev device has the right of_node attached. To be able to do this add an additional parameter to the regulator_register() api, wherein the dt-adapted driver can then pass this additional info onto the regulator core. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-06Merge branch 'modsplit-Oct31_2011' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits) Revert "tracing: Include module.h in define_trace.h" irq: don't put module.h into irq.h for tracking irqgen modules. bluetooth: macroize two small inlines to avoid module.h ip_vs.h: fix implicit use of module_get/module_put from module.h nf_conntrack.h: fix up fallout from implicit moduleparam.h presence include: replace linux/module.h with "struct module" wherever possible include: convert various register fcns to macros to avoid include chaining crypto.h: remove unused crypto_tfm_alg_modname() inline uwb.h: fix implicit use of asm/page.h for PAGE_SIZE pm_runtime.h: explicitly requires notifier.h linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h miscdevice.h: fix up implicit use of lists and types stop_machine.h: fix implicit use of smp.h for smp_processor_id of: fix implicit use of errno.h in include/linux/of.h of_platform.h: delete needless include <linux/module.h> acpi: remove module.h include from platform/aclinux.h miscdevice.h: delete unnecessary inclusion of module.h device_cgroup.h: delete needless include <linux/module.h> net: sch_generic remove redundant use of <linux/module.h> net: inet_timewait_sock doesnt need <linux/module.h> ... Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in - drivers/media/dvb/frontends/dibx000_common.c - drivers/media/video/{mt9m111.c,ov6650.c} - drivers/mfd/ab3550-core.c - include/linux/dmaengine.h
2011-10-31regulator: Add module.h to drivers/regulator users as requiredPaul Gortmaker
Another group of drivers that are taking advantage of the implicit presence of module.h -- and will break when we pull the carpet out from under them during a cleanup. Fix 'em now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-08-28regulator: tps6586x: add SMx slew rate settingXin Xie
Add output vlotage slew rate setting for SM0/SM1 Signed-off-by: Xin Xie <xxie@nvidia.com> Signed-off-by: Danny Huang <dahuang@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-12regulator: Report actual configured voltage to set_voltage()Mark Brown
Change the interface used by set_voltage() to report the selected value to the regulator core in terms of a selector used by list_voltage(). This allows the regulator core to know the voltage that was chosen without having to do an explict get_voltage(), which would be much more expensive as it will generally access hardware. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09regulator: tps6586x: correct register tableDanny Huang
Correct the register table for SM2, LDO8, RTC Change-Id: I45348cec5ffbb7da9bd7523764fb611b537236b8 Signed-off-by: Danny Huang <dahuang@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09regulator: tps6586x: Handle both enable reg/bits being the sameDanny Huang
Change-Id: I40400bb65eab496bb1becd26b37a9653b99d4f41 Signed-off-by: Danny Huang <dahuang@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Split into separate patches) Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09regulator: tps6586x: Fix TPS6586X_DVM to store goreg/bitDanny Huang
Change-Id: Idacf5e1e51dbbbcd5ea93f310a4e907977e7359e Signed-off-by: Danny Huang <dahuang@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Split into separate patches) (Minor formatting fixes) Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09regulator: tps6586x: Add missing bit mask generationDanny Huang
Change-Id: I76eaceb31b56264f6978af15db1e6fc7e2e01b5a Signed-off-by: Danny Huang <dahuang@nvidia.com> Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> (Split into separate patches) Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-01regulator: tps6586x-regulator - fix bit_mask parameter for tps6586x_set_bits()Axel Lin
The third parameter of tps6586x_set_bits() is the bit_mask, thus we should use (1 << ri->go_bit) instead of ri->go_bit. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-01regulator: tps6586x-regulator - fix value range checking for valAxel Lin
val is used as array index of ri->voltages. Thus the valid value range should be 0 .. ri->desc.n_voltages - 1. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-11regulator: Remove default DEBUG define from TPS6586xMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-11regulator: tps6586x - add regulator_unregister() in tps6586x_regulator_remove()Axel Lin
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-11regulator: tps6586x: fix millivolt return values and SM2 tableGary King
Hi Liam, Below are bugfixes for the tps6586x spotted by Gary King. Please add this patch to your regulator tree. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-11regulator: add TPS6586X regulator driverMike Rapoport
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>