summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mfd: twl: define all feature flags in one place.NeilBrown2012-05-092-9/+6
| | | | | | | | | | | | twl-regulator has a collection of feature flags, some defined in twl-core.c and one defined in i2c/twl.h. This is confusing for anyone adding a new feature flag. So collect them together and place them in twl.h immediately after the structure in which they are initially set. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65910: Convert to get_voltage_selAxel Lin2012-05-091-25/+9
| | | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8994: Use main I2C device as struct deviceMark Brown2012-05-081-1/+1
| | | | | | | This makes logging a bit clearer as it gives the actual bus location and makes things like board hookup a bit smoother. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: fix stylistic issue and optimize codeLaxman Dewangan2012-05-081-71/+60
| | | | | | | | | | | | | | | | | | | Fix multiple stylistic issue like: - The print message should be not break into multiple line. - line gap after variable declaration and statement. - checkpatch error. - some typo. Some enhancement on error message printing to print error value also along with proper text. Avoid voltage_base conversion to microvolts every time. Put init functions in init section. Using efficient function inplace of calling multiple function to reduce the code size. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-dcdc: Convert to gpio_request_one()Mark Brown2012-05-071-10/+4
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8994: Convert to gpio_request_one()Mark Brown2012-05-071-8/+1
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: Provide settling time for voltage changeLaxman Dewangan2012-05-071-6/+40
| | | | | | | | | Settling time is require when there is voltage output change. Implement set_voltage_time_sel() callback which returns delay time for voltage change to settle down to new value. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: enable register cacheLaxman Dewangan2012-05-071-2/+4
| | | | | | | Enable cache of device register using regmap cache RBTREE. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: fix bug in device tree iteration loopYing-Chun Liu (PaulLiu)2012-05-071-1/+1
| | | | | | | | The driver of da9052 is buggy due to the iteration loop of device tree. This patch fix the loop condition to make the driver work with device tree. Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: fixed: add property for gpio open drain flagLaxman Dewangan2012-05-072-1/+7
| | | | | | | | Add property for the gpio flag open drain when registering fixed regulator. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* tps6586x: Add device tree supportThierry Reding2012-05-044-0/+185
| | | | | | | 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>
* regulator: Add generic DT parsing for regulatorsThierry Reding2012-05-042-0/+65
| | | | | | | | | | | | | Looking up init data for regulators found on chips is a common operation that can be handled in a generic way. The new helper function introduced by this patch looks up the children of a given node by names specified in a match table and fills that match table with information parsed from the DT. This is based on work by Rhyland Klein <rklein@nvidia.com>. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-dcdc: Specify supply namesMark Brown2012-04-231-1/+12
| | | | | | Allows hookup via normal consumer mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm831x-ldo: Set up supply namesMark Brown2012-04-231-1/+17
| | | | | | Allows hookup via normal consumer mechanisms. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65912: Convert to get_voltage_selAxel Lin2012-04-231-4/+4
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8998: Convert ot use devm_kzallocAxel Lin2012-04-231-28/+17
| | | | | | | | | | | Also simplify the error handling to start unwind from the place regulator_register fails. No need to check rdev[i] is NULL or not before calling regulator_unregister. regulator_unregister is safe if rdev is NULL, Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8997: Convert ot use devm_kzallocAxel Lin2012-04-231-25/+15
| | | | | | | | | | | Also simplify the error handling to start unwind from the place regulator_register fails. No need to check rdev[i] is NULL or not before calling regulator_unregister. regulator_unregister is safe if rdev is NULL, Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Remove unneeded include of linux/delay.h from regulator driversAxel Lin2012-04-2316-16/+0
| | | | | | | | | | | | | All the drivers that need delay for the regulator voltage output voltage to stabilize after being enabled or after being set to a new value has been converted to implement enable_time and set_voltage_time_sel callbacks. Then regulator core will take care of the necessary delay. For the drivers that don't need the delay, don't need to include linux/delay.h. This patch removes the unneeded include of linux/delay.h in regulator drivers. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8997: Remove empty set_suspend_enable callback implementationAxel Lin2012-04-231-9/+0
| | | | | | | | | Since commit 8ac0e95 "regulator: core: Support setting suspend_[mode|voltage] if set_suspend_[en|dis]able is NULL", now the regulator core can properly handle the case set_suspend_enable callback is NULL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8997: Remove is_enabled callback implementation for ↵Axel Lin2012-04-231-4/+1
| | | | | | | | | | | | | max8997_charger_fixedstate_ops If is_enabled callback is not implemented, the core assumes that the regulator is on. This is simpler than having a hack to retrun 1 in max8997_reg_is_enabled() if max8997_get_enable_register() returns -EINVAL. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: s5m8767: Use DIV_ROUND_UP to calculate selectorAxel Lin2012-04-231-1/+4
| | | | | | | | | | | Integer division may truncate the result. Use DIV_ROUND_UP to ensure new voltage setting falls within specified range. Also properly handle the case min_vol < desc->min to ensure we don't return negative value for selector. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8952: Convert to get_voltage_selAxel Lin2012-04-201-9/+4
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps6507x: Convert to get_voltage_selAxel Lin2012-04-201-3/+3
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: virtual: Replace strict_strtol with kstrtolAxel Lin2012-04-191-4/+4
| | | | | | | | strict_strtol is deprecated and results in a checkpatch warning. Replace it with kstrtol. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: 88pm8607: Fix writting value to vol_reg in pm8607_set_voltage_selAxel Lin2012-04-191-1/+1
| | | | | | | | | commit 4ca1e1d "regulator: Convert 88pm8607 to set_voltage_sel" accidentally changed the value writing to vol_reg. What we want is to write val instead of selector to vol_reg. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: virtual: Convert to use devm_* APIsAxel Lin2012-04-181-13/+5
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: userspace-consumer: Convert to use devm_* APIsAxel Lin2012-04-181-13/+7
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert max8997 to set_voltage_time_selAxel Lin2012-04-171-13/+42
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert max8997 to get_voltage_selAxel Lin2012-04-171-21/+32
| | | | | | | | | Also rename get_current_limit and set_current_limit callbacks to max8997_get_current_limit and max8997_set_current_limit for better readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* mfd: Revert "mfd: add irq domain support for max8997 interrupts"Mark Brown2012-04-176-39/+33
| | | | | | | | This reverts commit 98d8618af37728f6e18e84110ddb99987b47dd12 as it breaks the build of the muic driver. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8660: Fix a memory leak due to missing devm_kzalloc conversionAxel Lin2012-04-171-1/+1
| | | | | | | | commit 4d26f7 "regulator: max8660: Use devm_kzalloc()" missed to replace kzalloc by devm_kzalloc. Fix it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* mfd: add irq domain support for max8997 interruptsThomas Abraham2012-04-166-33/+39
| | | | | | | | | | | | | | Add irq domain support for max8997 interrupts. The reverse mapping method used is linear mapping since the sub-drivers of max8997 such as regulator and charger drivers can use the max8997 irq_domain to get the linux irq number for max8997 interrupts. All uses of irq_base in platform data and max8997 driver private data are removed. Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: Directly include of.hMark Brown2012-04-161-0/+1
| | | | | Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: wm8994: Convert to set_voltage_sel()Mark Brown2012-04-151-35/+6
| | | | | | | | There's no need to implement set_voltage() as there is only a very small range of selectors for the regulators in the WM8994 and the voltages are not expected to vary frequently at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: da9052: add device tree supportYing-Chun Liu (PaulLiu)2012-04-131-1/+28
| | | | | | | | | | | | This patch adds device tree support for dialog regulators Signed-off-by: Ying-Chun Liu (PaulLiu) <paul.liu@linaro.org> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@ti.com> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Ashish Jangam <ashish.jangam@kpitcummins.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8660: Use devm_kzalloc()Axel Lin2012-04-131-13/+7
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max1586: Use devm_kzalloc()Axel Lin2012-04-131-11/+5
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: isl6271a-regulator: Use devm_kzalloc()Axel Lin2012-04-131-6/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert max8998 to set_voltage_time_selAxel Lin2012-04-131-7/+28
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert max8998 to get_voltage_selAxel Lin2012-04-131-9/+10
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: twl-regulator: Use twlreg_grp helper functionAxel Lin2012-04-131-11/+10
| | | | | | | Since the twlreg_grp helper function is there, use it. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: twl-regulator: Implement enable_time callbackAxel Lin2012-04-131-4/+19
| | | | | | | Let regulator core do the necessary delay for us. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Update regulator_register() API signature in DocumentationAxel Lin2012-04-131-2/+1
| | | | | | | | | | | commit c172708 "regulator: core: Use a struct to pass in regulator runtime configuration" changed the regulator_register() API signature. Update the Documentation accordingly to reflect the change in the function signature. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Appease smatch in regulator_register()Mark Brown2012-04-111-1/+3
| | | | | | | We don't support missing configs at all so segfaulting isn't that bad but since we've got checks in the code move the dereference after them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert tps65xxx regulator drivers to use devm_kzallocAxel Lin2012-04-114-19/+6
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: Convert anatop to use a struct to pass in regulator runtime ↵Axel Lin2012-04-101-2/+7
| | | | | | | configuration Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: twl-regulator: Fix off-by-one vsel setting in twl6030smps_set_voltageAxel Lin2012-04-101-4/+10
| | | | | | | | | | | | | | commit 268a1 "regulator: twl-regulator: Use DIV_ROUND_UP at appropriate places" introduced an off-by-one bug for setting vsel. The linear calculation code in twl6030smps_list_voltage() does subtract index by 1 so we need the vsel++ after DIV_ROUND_UP. The original code use this trick to differentiate if we are going to set the voltage to 0 or the voltage falls within the linear calculation range. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps65023: Use devm_* APIsAxel Lin2012-04-101-11/+3
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: tps62360: Convert to devm_regmap_init_i2c()Axel Lin2012-04-101-3/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max8649: Use devm_* APIsAxel Lin2012-04-101-13/+6
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud