summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lp8788-buck.c
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner2019-06-191-5/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* regulator: lp8788-buck: Convert to linear rangeAxel Lin2019-02-111-18/+20
| | | | | | | linear range is suitable for this driver, let's convert it to linear range. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: lp8788-buck: Constify lp8788_buck_descAxel Lin2019-01-281-1/+1
| | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: lp8788: constify regulator_ops structuresJulia Lawall2015-12-231-2/+2
| | | | | | | | | | The regulator_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0Star
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* regulator: lp8788-buck: use devm_regulator_register()Jingoo Han2013-09-301-11/+1Star
| | | | | | | | 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>
* regulator: Remove all platform_set_drvdata(pdev, NULL) in driversAxel Lin2013-05-121-1/+0Star
| | | | | | | | | Since 0998d06310 "device-core: Ensure drvdata = NULL when no driver is bound", this is done by driver core after device_release or on probe failure. Thus we can remove all platform_set_drvdata(pdev, NULL) in drivers. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp8788-buck: Use regulator_map_voltage_ascendAxel Lin2013-04-251-0/+2
| | | | | | | | 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>
* regulator: lp8788-buck: Remove buck[1|2]_vout_addr arrayAxel Lin2013-01-171-12/+2Star
| | | | | | | | | The vout address for buck[1|2] can be easily calculated, thus remote these arrays. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* regulator: lp8788-buck: Silence build warningAxel Lin2013-01-101-1/+4
| | | | | | | | | | | | | This driver use id as array index, thus add bounder checking for id. This patch fixes below build warning: drivers/regulator/lp8788-buck.c: In function 'lp8788_buck_probe': drivers/regulator/lp8788-buck.c:490:8: warning: array subscript is above array bounds [-Warray-bounds] drivers/regulator/lp8788-buck.c:489:63: warning: array subscript is above array bounds [-Warray-bounds] Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* lp8788-buck: fix a for-loop coding styleKim, Milo2013-01-031-1/+1
| | | | | | | Remove space before semicolon in for-loop. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* lp8788-buck: fix a parent device on devm_gpio_request()Kim, Milo2013-01-031-6/+8
| | | | | | | | Use 'platform_device' rather than i2c client device node. Arguments are added in lp8788_init_dvs() and lp8788_dvs_gpio_request(). Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* lp8788-buck: fix a parent deivce in _probe()Kim, Milo2013-01-031-3/+3
| | | | | | | | | | | | | The lp8788-buck is a platform driver of lp8788-mfd. The platform device is allocated when mfd_add_devices() is called in lp8788-mfd. On the other hand, 'lp->dev' is the i2c client device. Therefore, this 'platform_device' is a proper parent device in case of resource managed mem alloc, registering a regulator and device kernel message. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge remote-tracking branch 'regulator/topic/lp8788' into regulator-nextMark Brown2012-12-101-14/+4Star
|\
| * regulator: lp8788-buck: Kill _gpio_request functionAxel Lin2012-12-101-14/+4Star
| | | | | | | | | | | | | | | | Simply use devm_gpio_request_one() instead. 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 __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: Use BUCK_FPWM_[MASK|SHIFT] macros to replace buck_pmap tableAxel Lin2012-08-281-43/+12Star
| | | | | | | | | | | | | | | | | | | | | Below is the buck_pmap mapping table: BUCK1: mask = 1 << 0, shift = 0 BUCK2: mask = 1 << 1, shift = 1 BUCK3: mask = 1 << 2, shift = 2 BUCK4: mask = 1 << 3, shift = 3 The mask and shift can be easily calculated by: mask = 1 << BUCK_ID shift = BUCK_ID This patch defines BUCK_FPWM_MASK and BUCK_FPWM_SHIFT macros to replace buck_pmap mapping table. 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: lp8788-buck: Remove lp8788_set_default_dvs_ctrl_mode functionAxel Lin2012-08-281-22/+3Star
| | | | | | | | | | | We already know the mask in lp8788_init_dvs() function, and we can update the corresponding bit for default_dvs_mode in lp8788_init_dvs() function. This function looks not necessary to me. 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: add new lp8788 regulator driverKim, Milo2012-07-201-0/+629
TI LP8788 PMU has 4 BUCKS and 22 LDOs. The voltage of BUCK1 and BUCK2 can be controlled by external gpios. And some LDOs also can be enabled by external gpios. The regmap interface is used for regulator operations. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>