summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77686.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: Remove unnecessary include of linux/delay.h from regulator driversAxel Lin2013-05-121-1/+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. This patch removes the unneeded include of linux/delay.h in regulator drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Cc: Daniel Jeong <daniel.jeong@ti.com> Cc: Sangbeom Kim <sbkim73@samsung.com> Cc: Chiwoong Byun <woong.byun@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Don't update max77686->opmode if update register failsAxel Lin2013-04-281-11/+21
| | | | | | | Ensure max77686->opmode always has correct status. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@sirena.org.uk>
* regulator: max77686: Reuse rdev_get_id() function.Thiago Farina2013-02-141-6/+8
| | | | | Signed-off-by: Thiago Farina <tfarina@chromium.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Fix using wrong dev argument at various placesAxel Lin2013-01-271-7/+8
| | | | | | | | | Use &pdev->dev rather than iodev->dev for dev_err(). Use &pdev->dev rather than iodev->dev for devm_kzalloc() and of_regulator_match(), this fixes memory leak. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/max77686' into regulator-nextMark Brown2012-12-101-9/+155
|\
| * regulator: max77686: Make max77686_enable() static.Yadwinder Singh Brar2012-10-221-1/+1
| | | | | | | | | | | | | | | | This patch fixes a sparse warning. Since max77686_enable() is a callback,so it should be static. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: max77686: Add set_suspend_disable/set_suspend_mode callbacks.Yadwinder Singh Brar2012-10-171-7/+141
| | | | | | | | | | | | | | | | | | | | This patch implements set_suspend_disable callback for BUCKs which support only switch ON/OFF modes during system suspend state, and set_suspend_mode callbacks for LDOs which also suport Low power mode and switch ON/OFF modes. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
| * regulator: max77686: Use already set opmode while re-enabling regulators.Yadwinder Singh Brar2012-10-171-2/+14
| | | | | | | | | | | | | | | | This patch adds basic support to take care of opmode(if any) which can be set by set_suspend_[disable/mode] callbacks. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | regulator: remove use of __devexitBill Pemberton2012-11-201-1/+1
| | | | | | | | | | | | | | | | 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>
* | regulator: remove use of __devinitBill Pemberton2012-11-201-1/+1
| | | | | | | | | | | | | | | | 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>
* | regulator: remove use of __devexit_pBill Pemberton2012-11-201-1/+1
|/ | | | | | | | 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>
* regulator: max77686: Use array to save pointer to rdevAxel Lin2012-08-281-19/+9
| | | | | | | | MAX77686_REGULATORS is known in compile time. Use array to save pointer to rdev makes the code simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: initialize of_node param for regulator registerAxel Lin2012-08-281-0/+2
| | | | | | | | Initialize config.of_node for regulator before registering. This is needed for DT based regulator support. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Initialise rmatch.of_node to NULL.Yadwinder Singh Brar2012-07-061-0/+1
| | | | | | | | Now of_regulator_match() returns without finding the match if match->of_node is not NULL. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Add device tree support.Yadwinder Singh Brar2012-07-051-1/+57
| | | | | | | | This patch device tree support for regulator driver. It uses the parent (mfd's) DT node to parse the regulator data for max77686. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Implement .set_ramp_delay() callbackYadwinder Singh Brar2012-06-201-8/+29
| | | | | | | | | | | | This patch implements the .set_ramp_delay callback to set the ramp_delay on hardware for BUCK2/3/4 if ramp_delay is set in regulator constraints. This patch also do some cleaning work for unrequired members of struct max77686_data. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Initialize regulator_configAxel Lin2012-06-201-1/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Convert driver to use regulator_set_voltage_time_sel.Yadwinder Singh Brar2012-06-191-33/+9
| | | | | | | | | | This patch converts the driver to use regulator_set_voltage_time_sel() as .set_voltage_time_sel() callback. It also sets ramp_delay as 100000 uV/us for LDOs & normal BUCKs and 27500 uV/us(default/reset value) for BUCKs[2/3/4] in regulator_desc[]. Signed-off-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Fix the delay time for set_voltage_time_selAxel Lin2012-06-111-2/+2
| | | | | | | | | | rdev->desc->uV_step * abs(new_selector - old_selector) returns uV. The unit of ramp_rate is mV/us. Thus 1000 should be multiplied. Signed-off-by: Axel Lin <axel.lin@gmail.com> Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Check pdata->num_regulators earlierAxel Lin2012-06-111-24/+19
| | | | | | | | | | If this driver only works when pdata->num_regulators == MAX77686_REGULATORS, let's check it earlier. Also remove unused num_regulators from struct max77686_data. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Fix checkpatch warningsAxel Lin2012-06-041-6/+7
| | | | | | | | | | | | | | | | Fix below checkpatch warnings: $ scripts/checkpatch.pl -f drivers/regulator/max77686.c ERROR: return is not a function, parentheses are not required + return (DIV_ROUND_UP(rdev->desc->uV_step WARNING: line over 80 characters + .ops = &max77686_buck_dvs_ops, \ total: 1 errors, 1 warnings, 339 lines checked Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: max77686: Use regulator_map_voltage_linear for simple linear mappingsAxel Lin2012-06-031-0/+2
| | | | | | | | | Both max77686_ops and max77686_buck_dvs_ops use simple linear voltage maps. Thus use regulator_map_voltage_linear is more efficient than using the defult regulator_map_voltage_iterate. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: MAX77686: Add Maxim 77686 regulator driverJonghwa Lee2012-06-031-0/+337
Add driver for support max77686 regulator. MAX77686 provides LDOs[1~26] and BUCKs[1~9]. It support to set or get the volatege of regulator on max77686 chip with using regmap. Signed-off-by: Chiwoong Byun <woong.byun@samsung.com> Signed-off-by: Jonghwa Lee <jonghwa3.lee@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Reviewed-by: Yadwinder Singh Brar <yadi.brar@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud