summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/palmas-regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: remove unnecessary of_node_get() to parentGuodong Xu2014-09-101-1/+0
| | | | | | | | | | | | | | | These of_node_get() were added to balance refcount decrements inside of of_find_node_by_name(). See: commit c92f5dd2c42f ("regulator: Add missing of_node_put()") However of_find_node_by_name() was then replaced by of_get_child_by_name(), which doesn't call of_node_put() against its input parameter. So, need to remove these unnecessary of_node_get() calls. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: palmas: Fix SMPS enable/disable/is_enable for tps65917Nishanth Menon2014-07-031-0/+5
| | | | | | | | | | | | | | | | | We use regmap regulator ops to enable/disable and check if regulator is enabled for various SMPS. However, these depend on valid enable_reg, enable_mask and enable_value in regulator descriptor. So, similar to fix we did in commit 318dbb02b50c ("regulator: palmas: Fix SMPS enable/disable/is_enabled"), populate the same for TPS65917 SMPS registration. LDO definitions are already in place. Fixes: d6f83370ed97 ("regulator: palmas: Add tps65917 PMIC support") Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: palmas: Simplify code by not indexing regulator_desc unnecessarilyNishanth Menon2014-07-031-136/+112
| | | | | | | | | | | | Palmas regulator needs to full up the regulator_desc based on PMIC and type of regulator. However, we dont need to do desc[id] every time. we can simplify by using a pointer to desc[id] and filling up the parameters. Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: palmas: Rename palmas_regs_info to palmas_generic_regs_infoNishanth Menon2014-07-031-2/+2
| | | | | | | | | | | | With commit d6f83370ed978d5570b7c8c22988310cb9376202 (regulator: palmas: Add tps65917 PMIC support) palmas_regs_info naming is confusing as it is a driver data parameter and a local variable. To prevent mistaken updates, rename the local variable to palmas_generic_regs_info. Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: palmas: Simplify code by using pointer to palmas_reg_infoNishanth Menon2014-07-031-53/+56
| | | | | | | | | | | | | | Palmas register information is part of the ddata pointer which is used through out the code by indexing off the driver data array. Instead, just do the indexing once and use the pointer to further reference structure fields. This simplifies code and prevents errors by accessing wrong variables. Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: palmas: Rename reg_info to palmas_reg_infoNishanth Menon2014-07-031-2/+2
| | | | | | | | | | | | reg_info is a generic term which might cause conflict at a later point in time. To prevent such a thing from occuring in future, rename to palmas_reg_info. Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Lee Jones <lee.jones@linaro.org> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: palmas: Squelch sparse warningsNishanth Menon2014-07-031-3/+3
| | | | | | | | | | | | convert to static variables to squelch the following sparse warnings: drivers/regulator/palmas-regulator.c:325:36: warning: symbol 'palma_sleep_req_info' was not declared. Should it be static? drivers/regulator/palmas-regulator.c:1414:32: warning: symbol 'palmas_ddata' was not declared. Should it be static? drivers/regulator/palmas-regulator.c:1427:32: warning: symbol 'tps65917_ddata' was not declared. Should it be static? Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Stephen Warren <swarren@nvidia.com> Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/fix/palmas' into regulator-palmasMark Brown2014-06-241-0/+12
|\ | | | | | | | | Conflicts: drivers/regulator/palmas-regulator.c
| * regulator: palmas: fix typo in enable_reg calculationStephen Warren2014-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | When setting up .enable_reg for an SMPS regulator, presumably we should call PALMAS_BASE_TO_REG(PALMAS_SMPS_BASE, ...) rather than using LDO_BASE. This change makes the LCD panel and HDMI work again on the NVIDIA Dalmore board anyway. Fixes: 318dbb02b50c ("regulator: palmas: Fix SMPS enable/disable/is_enabled") Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Nishanth Menon <nm@ti.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * regulator: palmas: Fix SMPS enable/disable/is_enabledNishanth Menon2014-06-211-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use regmap regulator ops to enable/disable and check if regulator is enabled for various SMPS. However, these depend on valid enable_reg, enable_mask and enable_value in regulator descriptor. Currently we do not populate these for SMPS other than SMPS10, this results in spurious results as regmap assumes that the values are valid and ends up reading register 0x0 RTC:SECONDS_REG on Palmas variants that do have RTC! To fix this, we update proper parameters for the descriptor fields. Further, we want to ensure the behavior consistent with logic prior to commit dbabd624d4eec50b6, where, once you do a set_mode, enable/disable ensure the logic remains consistent and configures Palmas to the configuration that we set with set_mode (since the configuration register is common). To do this, we can rely on the regulator core's regulator_register behavior where the regulator descriptor pointer provided by the regulator driver is stored. (no reallocation and copy is done). This lets us update the enable_value post registration, to remain consistent with the mode we configure as part of set_mode. Fixes: dbabd624d4eec50b6 ("regulator: palmas: Reemove open coded functions with helper functions") Reported-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Nishanth Menon <nm@ti.com> Tested-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: Add tps65917 PMIC supportKeerthy2014-06-231-0/+387
| | | | | | | | | | | | | | Add tps65917 PMIC support. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: add driver data and modularize the probeKeerthy2014-06-231-266/+392
| | | | | | | | | | | | | | add driver data and modularize the probe. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: Shift the reg_info structure definition to the header fileKeerthy2014-06-231-9/+0
| | | | | | | | | | | | | | | | Shift the reg_info structure definition to the header file. Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: Fix SMPS list for 0VNishanth Menon2014-06-051-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_voltage_sel reads from SMPS register - if the read selector value is 0, the SMPS is actually disabled - So, this is in addition to the ctrl_register that may also be used to enable/disable the SMPS. The original logic(prior to commit dbabd624d4eec50b6) used to be: static int palmas_map_voltage_smps(struct regulator_dev *rdev, int min_uV, int max_uV) <snip> if (min_uV == 0) return 0; To handle this scenario, with the transition to regulator_list implementation, we seem to have missed the data necessary to mark as one of the valid entries as "0" 'disabled regulator' which results in 0 volts - So, stick with pre-existing logic. Without this added to the list, palmas regulator driver, on probe, attempts to setup constraints and in the case of OMAP5uEVM, SMPS9 (which is mapped for 2v1 audio supply) fails in regulator_list_voltage_linear_range mapping of '0', and as a fall back of constraints not being applied, the entire regulator list is not enumerated due to assumption that something system wide has gone bad on with the PMIC. Fixes: dbabd624d4eec50b6 ("regulator: palmas: Reemove open coded functions with helper functions") Reported-by: Olof Johansson <olof@lixom.net> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'regulator/topic/palmas', ↵Mark Brown2014-06-021-132/+26
|\ \ | | | | | | | | | 'regulator/topic/pbias', 'regulator/topic/pfuze100', 'regulator/topic/s2mpa01' and 'regulator/topic/s2mps11' into regulator-next
| * | regulator: palmas: Reemove open coded functions with helper functionsKeerthy2014-05-221-132/+26
| |/ | | | | | | | | | | | | Reemove open coded functions with helper functions. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: Make of_device_id array constJingoo Han2014-05-071-1/+1
|/ | | | | | | | Make of_device_id array const, because all OF functions handle it as const. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/topic/palmas' into regulator-nextMark Brown2013-10-241-7/+159
|\
| * regulator: palmas: get regulators node from parent node onlyLaxman Dewangan2013-10-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The device tree binding of Palmas regulator driver says as: palmas_pmis { compatible = "ti,palmas-pmic"; ... regulators { ... } }; In this "regulators" subnode is expected to be part of parent node, not the outside of parent node. Hence to get the regulator node, the correct call is of_get_child_by_name() rather than of_find_node_by_name() which actually searches the "regulators" node from the parent node to end of DTS file. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * Merge remote-tracking branch 'regulator/topic/devm' into regulator-palmasMark Brown2013-09-171-30/+12
| |\ | | | | | | | | | | | | Conflicts: drivers/regulator/palmas-regulator.c
| * | regulator: palmas: configure enable time for LDOsLaxman Dewangan2013-09-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per datasheet (Referred TPS65913), the on-time for LDO is 500micro second. If LDO6 is in vibrator mode then the on-time is 2000us. Set the enable_time on regulator descriptor accordingly. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | regulator: palmas: add support for external control of railsLaxman Dewangan2013-09-171-6/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Palmas rails like LDOs, SMPSs, REGENs, SYSENs can be enable and disable by register programming through I2C communication as well as it can be enable/disable with the external control input ENABLE1, ENABLE2 and NSLEEP. Add support for configuring these rails to be controlled by external control inputs. This is require to configure the rail's control register as well as configuration of resource register. Provide the external input names through parameter "roof-floor". Updated the DT binding document to details different value of the roof-floor. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge remote-tracking branch 'regulator/topic/alias' into regulator-nextMark Brown2013-10-241-30/+12
|\ \ \ | | |/ | |/|
| * | regulator: palmas: Drop regulator_unregister while using devm_regulator_registerAxel Lin2013-09-171-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Commmit af40a94aba "regulator: palmas: Use devm_regulator_register" missed removing a regulator_unregister() call if palmas_extreg_init falis. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | regulator: palmas: Use devm_regulator_registerSachin Kamat2013-09-171-27/+11
| |/ | | | | | | | | | | | | devm_* simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: Remove wrong comment for the equation calculating ↵Axel Lin2013-09-171-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | num_voltages Current equation on the comment is wrong. For linear mapping starting from 0, the equation is (maxV-minV)/stepV + 1. Since the linear mapping for PALMAS is not all starting from 0, the equation on the comment is not useful and misleading. Thus remove it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: configure enable time for LDOsLaxman Dewangan2013-09-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | As per datasheet (Referred TPS65913), the on-time for LDO is 500micro second. If LDO6 is in vibrator mode then the on-time is 2000us. Set the enable_time on regulator descriptor accordingly. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: palmas: fix the n_voltages for smps to 122Laxman Dewangan2013-09-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the following change --------- commit ad02e846878ca35e9d3fa584be8ee770e9e14fce Author: Axel Lin <axel.lin@ingics.com> regulator: palmas: Return raw register values as the selectors in [get|set]_voltage_sel Don't adjust the selector in [get|set]_voltage_sel, fix it in list_voltage() instead. For smps*(except smps10), the vsel reg-value and voltage mapping as below: ---------- The list_voltage() takes the true value of selector which is programmed in the register. As per smsp voltage table reg-value volt (uV) ( Assume RANGE is x1 ) 0 0 1 500000 2 500000 3 500000 4 500000 5 500000 6 500000 (0.49V + 1 * 0.01V) * RANGE 7 510000 (0.49V + 2 * 0.01V) * RANGE 8 520000 (0.49V + 3 * 0.01V) * RANGE 9 530000 (0.49V + 4 * 0.01V) * RANGE .... 121 1650000 (0.49V + 116 * 0.1) * RANGE Hence making n_voltages for smps to 122. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/topic/palmas' into regulator-nextMark Brown2013-09-011-6/+24
|\
| * regulator: palmas: model SMPS10 as two regulatorsKishon Vijay Abraham I2013-08-121-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMPS10 has two outputs OUT1 and OUT2 and have one input IN1. SMPS10-OUT2 is connected to SMPS10-IN1 and can be configured either in BOOST mode or BYPASS mode. regulator_enable of SMPS10-OUT2 configures it in BOOST mode. For BYPASS mode regulator_allow_bypass() API can be used. SMPS10-OUT1 is connected to SMPS10-OUT2 and can be enabled using regulator_enable(). [ axel.lin@ingics.com : Simplify regulator_desc setting for SMPS10_[OUT1|OUT2] Signed-off-by: J Keerthy <j-keerthy@ti.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | regulator: use dev_get_platdata()Jingoo Han2013-07-301-1/+1
|/ | | | | | | | Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: palmas: Add TPS659038 supportJ Keerthy2013-06-271-0/+1
| | | | | | | | Add TPS659038 support. Signed-off-by: J Keerthy <j-keerthy@ti.com> Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* mfd: palmas: Add SMPS10_BOOST featureJ Keerthy2013-06-201-0/+3
| | | | | | | | | The SMPS10 regulator is not presesnt in all the variants of the PALMAS PMIC family. Hence adding a feature to distingush between them. Signed-off-by: J Keerthy <j-keerthy@ti.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
* regulator: palmas: Fix "enable_reg" to point to the correct reg for SMPS10Kishon Vijay Abraham I2013-05-301-1/+1
| | | | | | | | | | | regulator_enable_regmap() uses enable_reg to enable the regulator. But enable_reg for smps10 points to SMPS10_STATUS which is a read-only register. Fixed the same by having enable_reg set to SMPS10_CTRL. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
* regulator: palmas: Fix incorrect conditionSachin Kamat2013-05-301-1/+1
| | | | | | | | | | | Since 'id' cannot take two values at the same time, the condition should probably be an OR (||) instead of AND (&&). Introduced by commit 28d1e8cd67 ("regulator: palma: add ramp delay support through regulator constraints"). Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/palmas' into v3.9-rc8Mark Brown2013-04-281-60/+305
|\
| * regulator: palmas: Fix off-by-one for ramp_delay and register value mappingAxel Lin2013-04-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Datasheet says: Time Step (TSTEP) selection, when changing the output voltage, the new value is reached through successive voltage steps (if not bypassed). The equivalent programmable slew rate of the output voltage is: TSTEP[1:0]: 00 Jump (no slope control) TSTEP[1:0]: 01 10mV/us TSTEP[1:0]: 10 5mV/us (default) TSTEP[1:0]: 11 2.5mV/us Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: Add missing ctrl_addr setting for SMPS10Axel Lin2013-04-221-0/+1
| | | | | | | | | | | | | | | | | | The ctrl_addr setting for SMPS10 is missed, thus palmas_smps_init() read/write wrong register for SMPS10 in current code. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: Don't update tstep register for SMPS3 and SMPS7Axel Lin2013-04-191-0/+7
| | | | | | | | | | | | | | | | | | | | SMPS3 and SMPS7 do not have tstep_addr setting, so current code actually writes 0 to smps12_ctl (offset is 0) register when set_ramp_delay callback is called for SMPS3 and SMPS7. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: Fix min_uV for LDO8 tracking modeAxel Lin2013-04-181-0/+1
| | | | | | | | | | | | | | | | | | When SMPS45 is set to off and LDO8 tracking is enabled, the output voltage can be set from 0.45 to 1.65 V. Thus set min_uV to be 450000. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: preserve modes of rails during enable/disableLaxman Dewangan2013-04-181-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Palma device like TPS65913 have the mode mask which is also used for enable/disable the rails. The mode bits are defined as 00: OFF 01: AUTO 10: ECO 11: Forced PWM and modes are set accordingly as REGULATOR_MODE_NORMAL: AUTO REGULATOR_MODE_IDLE: ECO REGULATOR_MODE_FAST: PWM Two issue observed: 1. If client calls following sequence: regulator_enable(), regulator_set_mode(FAST), regulator_disable() and again the regulator_enable() then the mode is reset to NORMAL inplace of keeping the mode as FAST. Fixing this by storing the current mode configured by client and restoring modes when enable() is called after disable(). 2. In following sequence, the regulator get enabled: regulator_disable() regulator_set_mode(FAST), Fixing this by updating new mode in register only if it is enabled. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palma: add ramp delay support through regulator constraintsLaxman Dewangan2013-04-181-15/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently Palma regulator driver support the ramp delay through rail specific platform data. As regulator framework support the configuration of ramp delay through regulator constraint, using the framework method and removing the platform specific data approach. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: add support for LDO8 tracking modeLaxman Dewangan2013-04-171-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | LDO8 of Palma device like tps65913 support the tracking mode on which LDO8 track the SMPS45 voltage when SMPS45 is ON and use the LDO8.VOLTAGE_SEL register when SMPS45 is OFF. On track mode, the steps of voltage change for LDO8 is 25mV where in non-tracking mode it is 50mV. Set the steps accordingly. Number of voltage count is still same for both the cases. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: support for external regulator through control outputsLaxman Dewangan2013-04-171-12/+83
| | | | | | | | | | | | | | | | | | | | | | Palmas device have control outputs like REGEN1, REGEN2, REGEN3, SYSEN1 and SYSEN2. These control outputs can be used for controlling external voltage switches to enabled/disable voltage outputs. Add support of these control outputs through regulator framework. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: clear sleep bits if not selectedLaxman Dewangan2013-04-171-6/+12
| | | | | | | | | | | | | | | | | | | | | | Clear the sleep/warm reset bits when it is not selected through regulator platform data. This will make sure that configuration is inline with the platform data regardless of boot/POR configuration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: add input supply namesLaxman Dewangan2013-03-281-0/+24
| | | | | | | | | | | | | | | | | | Palmas regulator support the different input supply pins for each of the rails. Fill the regulator info data with their input supply pin names. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas remove palmas-charger option from DT bindingsIan Lartey2013-03-251-1/+0
| | | | | | | | | | Signed-off-by: Ian Lartey <ian@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: rename probe/remove callback functionsLaxman Dewangan2013-03-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When palmas regulator probe creates stack dump during initialization due to some crash, it prints the call trace as follows: [3.166321] [<c028fa20>] (_regmap_read+0x5c/0xa8) from [<c028fab0>] (regmap_read+0x44/0x5c) [3.174669] [<c028fab0>] (regmap_read+0x44/0x5c) from [<c023062c>] (palmas_probe+0x240/0x7d0) [3.183193] [<c023062c>] (palmas_probe+0x240/0x7d0) from [<c0284064>] (platform_drv_probe+0x14/0x18) [3.192322] [<c0284064>] (platform_drv_probe+0x14/0x18) from [<c0282ee4>] (driver_probe_device+0x104/0x214) [3.202055] [<c0282ee4>] (driver_probe_device+0x104/0x214) from [<c028167c>] (bus_for_each_drv+0x5c/0x88) The palmas_probe is current name but it helps on debugging if the function name is more appropriate to the sub-module name. Renaming the palmas_probe() to palmas_regulator_probe() and palmas_remove() to palams_regulator_remove(). Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT propertyAxel Lin2013-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | It does not make sense to assign return value of of_property_read_u32() to pdata->reg_init[idx]->warm_reset. Use of_property_read_bool() to read "ti,warm-reset" DT property instead which will return correct setting for pdata->reg_init[idx]->warm_reset. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: palmas correct dt parsingGraeme Gregory2013-03-081-16/+20
| | | | | | | | | | | | | | | | | | Fix the DT parsing to agree with the bindings document. Some small changes to the value names and also fix the handling of boolean values. They were previously using prop = 1/0, now just use of_property_read_bool calls. Signed-off-by: Graeme Gregory <gg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud