summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp872x.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: lp872x: Don't set constraints within the regulator driverMark Brown2014-07-281-9/+0
| | | | | | | | Regulator drivers should not be specifying constraints since the valid configurations depend on how the device is used in a given system, there is no way to know if a configuration is safe for a given board. Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: lp872x: Do not hardcode return valuesSachin Kamat2014-02-201-2/+2
| | | | | | | Propagate the error values returned by the function instead. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: lp872x: use devm_regulator_register()Jingoo Han2013-09-301-30/+3
| | | | | | | | Use devm_regulator_register() to make cleanup paths simpler, and remove unnecessary remove(). Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'regulator/topic/max8660' into regulator-nextMark Brown2013-09-011-1/+1
|\
| * 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: lp872x: fix a build waring and coding stylesMilo Kim2013-07-151-4/+5
|/ | | | | | | | | | | | | | Fix a warning below. drivers/regulator/lp872x.c:910:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] And checkpatch warnings are fixed. WARNING: space prohibited before semicolon Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* regulator: lp872x: support the device tree featureKim, Milo2013-05-201-2/+114
| | | | | | | | | | This patch enables the DT structure of the LP8720 and LP8725 device. The LP872x platform data is generated when the device tree is configured. Even if the platform data is NULL, it is no issue at all because the driver is configured with the default mode. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: Use regulator_map_voltage_ascendAxel Lin2013-04-251-0/+3
| | | | | | | | All regulators have ascendant voltage list in this driver. Use regulator_map_voltage_ascend for them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/lp872x' into regulator-nextMark Brown2013-02-191-29/+7
|\
| * regulator: lp872x: Kill _rdev_to_offset() functionAxel Lin2012-12-101-29/+7
| | | | | | | | | | | | | | | | | | There is only one user calling _rdev_to_offset() function. Remove _rdev_to_offset() makes the code simpler. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.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 __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: lp872x: remove unnecessary functionKim, Milo2012-09-061-28/+0
| | | | | | | | | The lp872x_check_dvs_validity() is used for checking DVS platform data. If the DVS platform data is not defined, return as error code. Now, this is unnecessary because the default DVS mode is set in this case. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: fix NULL pointer access problemKim, Milo2012-09-061-4/+4
| | | | | | | | | | | | | | The lp872x_set_dvs() is used for changing the DVS pin state. This function works only when the DVS platform data is defined. So don't assume that DVS data is always valid. In case the platform data is not defined, the DVS data is set to NULL for skipping the DVS pin control. DVS selection and GPIO pin number are used for the LP872x DVS pin control. For better readability, DVS selection argument is added in lp872x_set_dvs(). Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: initialize the DVS modeKim, Milo2012-09-061-2/+3
| | | | | | | | | | | The platform specific configuration(general_config) is optional. However, the DVS settings should be configured explicitly while loading the driver. This patch enables configuring the default DVS mode even though the platform data is not defined. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: set the default DVS modeKim, Milo2012-09-061-1/+14
| | | | | | | | | | The lp872x driver has the DVS platform data which select the register address of the BUCK voltage. This patch enables updating the default DVS mode when the DVS platform data is not defined. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: remove regulator platform data dependencyKim, Milo2012-09-061-9/+7
| | | | | | | | This patch enables registering the regulator driver even though the regulator_init_data is not defined in the platform side. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: set_current_limit should select the maximum current in ↵Axel Lin2012-08-281-10/+8
| | | | | | | specific range Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()Axel Lin2012-07-161-21/+7
| | | | | | | | | | | Pass regulator id rahter than the index to lp872x_find_regulator_init_data(), then the code can be simpler. We can also get max_regulators by lp->num_regulators. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: change message level on probing lp872x driverKim, Milo2012-06-211-1/+1
| | | | | | | Use err log rather than warning message when the platform data is NULL Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp872x: Return -EINVAL if pdata is NULLAxel Lin2012-06-201-5/+5
| | | | | | | | Return -EINVAL if pdata is NULL, otherwise we have NULL dereference bug. This patch also moves the code checking pdata earlier in lp872x_probe. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: add new regulator driver for lp872xKim, Milo2012-06-191-0/+957
This driver supports TI/National LP8720, LP8725 PMIC. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Reviewed-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud