summaryrefslogtreecommitdiffstats
path: root/drivers/regulator (follow)
Commit message (Collapse)AuthorAgeFilesLines
*---------. Merge remote-tracking branches 'regulator/fix/max1586', ↵Mark Brown2014-11-056-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'regulator/fix/max77686', 'regulator/fix/max77693', 'regulator/fix/max77802', 'regulator/fix/max8860' and 'regulator/fix/s2mpa01' into regulator-linus
| | | | | | * regulator: s2mpa01: zero-initialize regulator match table arrayJavier Martinez Canillas2014-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct of_regulator_match rmatch[] is declared as a non-static local variable so the structure members are not auto-initialized. Initialize the array at declaration time to avoid the structure members values to be indeterminate and have sane defaults instead. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | regulator: max8660: zero-initialize regulator match table arrayJavier Martinez Canillas2014-11-031-1/+1
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct of_regulator_match rmatch[] is declared as a non-static local variable so the structure members are not auto-initialized. Initialize the array at declaration time to avoid the structure members values to be indeterminate and have sane defaults instead. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * / regulator: max77802: zero-initialize regulator match tableJavier Martinez Canillas2014-11-031-1/+1
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct of_regulator_match is declared as a non-static local variable so the structure members are not auto-initialized. Initialize the struct at declaration time to avoid the structure members values to be indeterminate and have sane defaults instead. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / regulator: max77693: Fix use of uninitialized regulator configKrzysztof Kozlowski2014-11-031-1/+1
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Driver allocated on stack struct regulator_config but didn't initialize it fully. Few fields (driver_data, ena_gpio) were left untouched. This lead to using random ena_gpio values as GPIOs for max77693 regulators. On occasion these values could match real GPIO numbers leading to interfering with other drivers and to unsuccessful enable/disable of regulator. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Fixes: 80b022e29bfd ("regulator: max77693: Add max77693 regualtor driver.") Cc: <stable@vger.kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * / regulator: max77686: zero-initialize regulator match tableJavier Martinez Canillas2014-11-031-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The struct of_regulator_match is declared as a non-static local variable so the structure members are not auto-initialized. Initialize the struct at declaration time to avoid the structure members values to be indeterminate and have sane defaults instead. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
| * / regulator: max1586: zero-initialize regulator match table arrayJavier Martinez Canillas2014-11-031-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | The struct of_regulator_match rmatch[] is declared as a non-static local variable so the structure members are not auto-initialized. Initialize the array at declaration time to avoid the structure members values to be indeterminate and have sane defaults instead. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge remote-tracking branch 'regulator/fix/core' into regulator-linusMark Brown2014-11-051-1/+2
|\ \
| * | regulator: of: Lower the severity of the error with no containerMark Brown2014-10-291-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | Description of regulators should generally be optional so if there is no DT node for the regulators container then we shouldn't print an error message. Lower the severity of the message to debug level (it might help someone work out what went wrong) and while we're at it say what we were looking for. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge remote-tracking branch 'regulator/fix/rk808' into regulator-linusMark Brown2014-10-271-1/+1
|\ \ | |/ |/|
| * regulator: rk808: Fix min_uV for DCDC1 & DCDC2Chris Zhong2014-10-071-1/+1
| | | | | | | | | | | | | | | | The min_uv in DCDC1 & DCDC2 should be 712.5mv Signed-off-by: Chris Zhong <zyw@rock-chips.com> Reviwed-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | Merge tag 'for-v3.18' of git://git.infradead.org/battery-2.6Linus Torvalds2014-10-151-76/+4
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull power supply and reset updates from Sebastian Reichel: - Initial support for the following chips * max77836 (charger) * max14577 (charger) * bq27742 (battery gauge) * ltc2952 (poweroff) * stih416 (restart) * syscon-reboot (restart) * gpio-restart (restart) - cleanup of power supply core - misc fixes in power supply and reset drivers * tag 'for-v3.18' of git://git.infradead.org/battery-2.6: (48 commits) power: ab8500_fg: Fix build warning Documentation: charger: max14577: Update the date of introducing ABI power: reset: corrections for simple syscon reboot driver Documentation: power: reset: Add documentation for generic SYSCON reboot driver power: reset: Add generic SYSCON register mapped reset bq27x00_battery: Fix flag reading for bq27742 power: reset: use restart_notifier mechanism for msm-poweroff power: Add simple gpio-restart driver power: reset: st: Provide DT bindings for ST's Power Reset driver power: reset: Add restart functionality for STiH41x platforms power: charger-manager: Fix NULL pointer exception with missing cm-fuel-gauge power: max14577: Fix circular config SYSFS dependency power: gpio-charger: do not use gpio value directly power: max8925: Use of_get_child_by_name power: max8925: Fix NULL ptr dereference on memory allocation failure bq27x00_battery: Add support to bq27742 Documentation: charger: max14577: Document exported sysfs entry devicetree: mfd: max14577: Add device tree bindings document power: max17040: Add ID for MAX77836 Fuel Gauge block charger: max14577: Configure battery-dependent settings from DTS and sysfs ... Conflicts: drivers/power/reset/Kconfig drivers/power/reset/Makefile
| * regulator/mfd: max14577: Export symbols for calculating charger currentKrzysztof Kozlowski2014-09-241-76/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch prepares for changing the max14577 charger driver to allow configuring battery-dependent settings from DTS. The patch moves from regulator driver to MFD core driver and exports: - function for calculating register value for charger's current; - table of limits for chargers (MAX14577, MAX77836). Previously they were used only by the max14577 regulator driver. In next patch the charger driver will use them as well. Exporting them will reduce unnecessary code duplication. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Mark Brown <broonie@linaro.org> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| |
| \
| \
| \
*---. \ Merge remote-tracking branches 'regulator/topic/tps65217', ↵Mark Brown2014-09-303-101/+89
|\ \ \ \ | | | | | | | | | | | | | | | 'regulator/topic/tps65910' and 'regulator/topic/voltage-ev' into regulator-next
| | | * | regulator: core: Add REGULATOR_EVENT_PRE_VOLTAGE_CHANGE (and ABORT)Heiko Stübner2014-08-291-7/+56
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases we need to know when a regulator is about to be changed. Add a way for clients to be notified. Note that for set_voltage() we don't necessarily know what voltage we'll end up with, so we tell the client what the range will be so they can prepare. Signed-off-by: Heiko Stübner <heiko@sntech.de> Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie+linaro@kernel.org>
| | * / regulator: tps65910: Allow missing init_data for diagnosticsAxel Lin2014-08-161-11/+2
| | |/ | | | | | | | | | | | | | | | | | | | | | The regulator core supports this to allow the configuration to be inspected at runtime even if no software management is enabled. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | regulator: tps65217: Use simplified DT parsingMark Brown2014-09-101-77/+29
| | | | | | | | | | | | | | | | | | Remove a bunch of code in favour of data. Signed-off-by: Mark Brown <broonie@linaro.org>
| * | Merge branch 'topic/of' of ↵Mark Brown2014-09-103-3/+62
| |\ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-tps65217
| * | | regulator: tps65217: Remove unused driver_data from of_match tableMark Brown2014-09-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | We don't ever reference the driver_data we supply so remove it. Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | regulator: tps65217: Remove spurious platform data checkMark Brown2014-09-061-6/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | We should always be able to probe a regulator with no platform data. This will enable readback of current state, though no changes can be made to the device configuration. Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge remote-tracking branches 'regulator/topic/rk808', ↵Mark Brown2014-09-306-282/+673
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'regulator/topic/rn5t618' and 'regulator/topic/samsung' into regulator-next
| | | * | | regulator: s2mps11: Optimize the regulator description macroAmit Daniel Kachhap2014-08-161-174/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the regulator description macro take minimum and steps voltage as parameter. In this way many repeated macros can be removed. Now these macros are repeated only if the the LDO/BUCK ctrl registers have non-linear positions. The good thing is these ctrl registers are mostly linear so they are not passed as parameters. This patch reduces the code size and also allow easy addition of more s2mpxxx PMIC drivers which differs a lot in minimum/step voltages. Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | * | | regulator: s2mpa01: Optimize the regulator description macroAmit Daniel Kachhap2014-08-161-98/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes the regulator description macro take minimum and steps voltage as parameter. In this way many repeated macros can be removed. Now these macros are repeated only if the the LDO/BUCK ctrl registers have non-linear positions. The good thing is these ctrl registers are mostly linear so they are not passed as parameters. This patch reduces the code size and also allow easy addition of more s2mpxxx PMIC drivers which differs a lot in minimum/step voltages. Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | * | | regulator: s2mpxxx: Move regulator min/step voltages in common placeAmit Daniel Kachhap2014-08-162-41/+41
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a cleanup patch and moves min/step voltages in a common samsung header file so that they can be used by other s2mpxxx PMIC drivers. Only few required macros are added currently and others can be added if needed. Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | regulator: rn5t618: add driver for Ricoh RN5T618 regulatorsBeniamino Galvani2014-08-303-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports the 3 DCDC and 7 LDO regulators available on Ricoh RN5T618 PMIC. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: rk808: Add function for ramp delay for buck1/buck2Doug Anderson2014-09-161-2/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On rk808 buck1 and buck2 have programmable ramp delays. Let's add a function to allow a client of rk808 to set them. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: rk808: Fix missing of_node_putAxel Lin2014-09-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Pass &pdev->dev rather than &client->dev to of_regulator_match, the *dev argument is used for devres to ensure devm_of_regulator_put_matches() will be called when unload the module. 2. of_get_child_by_name() returns a node pointer with refcount incremented. Thus add missing of_node_put(reg_np). Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: rk808: Remove unused variablesAxel Lin2014-09-121-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove non-informative comment. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: rk808: Remove pdata from the regulatorChris Zhong2014-09-101-72/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Chris Zhong <zyw@rock-chips.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Doug Anderson <dianders@chromium.org> Tested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: RK808: Add proper input supplies for rk808Doug Anderson2014-09-021-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original RK808 regulator driver didn't setup input supplies properly. Add them. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: rk808: Fix n_voltages for DCDC4Axel Lin2014-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The min_sel is 0, max_sel is 15, so n_voltages should be 16. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | | regulator: rk808: Fix memory leakAxel Lin2014-08-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The memory allocated in rk808_regulator_probe() needs to be freed when the module is unloaded. Thus pass &pdev->dev rather than &client->dev to devm_kzalloc. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | regulator: rk808: remove redundant codeChris Zhong2014-08-271-13/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove the redundant code, since pdata has been removed from stuct rk808 Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | regulator: RK808: modify for struct rk808 changeChris Zhong2014-08-261-20/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "dev" has been deleted from "struct rk808" in rk808 mfd driver so rk808->dev should be replaced by &client->dev here. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | regulator: rk808: Fix uninitialized valueDoug Anderson2014-08-221-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RK808 regulator driver was putting its config on the stack but not initting it. That means that you got a semi-random config. Fix this. Signed-off-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
| * / / regulator: RK808: Add regulator driver for RK808Chris Zhong2014-08-203-0/+421
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | The regulator module consists of 4 DCDCs, 8 LDOs and 2 switches. The output voltages are configurable and are meant to supply power to the main processor and other components Signed-off-by: Chris Zhong <zyw@rock-chips.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | |
| \ \
| \ \
| \ \
*---. \ \ Merge remote-tracking branches 'regulator/topic/max1586', ↵Mark Brown2014-09-305-2/+685
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'regulator/topic/max77802' and 'regulator/topic/of' into regulator-next
| | | * | | regulator: of: Add stub OF match function for !OF caseMark Brown2014-09-101-0/+10
| | | | |/ | | | |/| | | | | | | | | | | Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: max77802: Remove duplicate rdev_get_id() callAxel Lin2014-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: max77802: set opmode to normal if off is read from hwJavier Martinez Canillas2014-08-271-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max77802 driver reads the default operating mode (opmode) set for regulators when enabled from the hardware registers. But if a regulator is disabled and the system warm restarted, the hardware reports OFF as the opmode so the regulator is not enabled. Default to operating mode NORMAL if OFF is read from the hardware register. Reported-by: Yuvaraj Cd <yuvaraj.lkml@gmail.com> Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Reviewed-by: Doug Anderson <dianders@chromium.org> Tested-by: Yuvaraj Kumar CD <yuvaraj.cd@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | regulator: max77802: Remove unused fields from struct max77802_regulator_prvAxel Lin2014-08-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both num_regulators and *rdev[MAX77802_REG_MAX] are not used, remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | regulator: Add driver for max77802 PMIC PMIC regulatorsJavier Martinez Canillas2014-08-183-0/+588
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAX77802 PMIC has 10 high-efficiency Buck and 32 Low-dropout (LDO) regulators. This patch adds support for all these regulators found on the MAX77802 PMIC and is based on a driver added by Simon Glass to the Chrome OS kernel 3.8 tree. Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk> Tested-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | regulator: max1586: of_get_max1586_platform_data() can be staticFengguang Wu2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: max1586: add device-tree supportRobert Jarzmik2014-09-011-2/+79
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add device-tree support to max1586. The driver can still be used with the legacy platform data, or the new device-tree way. This work is heavily inspired by the device-tree support of its cousin max8660 driver. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-------. \ \ Merge remote-tracking branches 'regulator/topic/drivers', ↵Mark Brown2014-09-3013-277/+2342
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'regulator/topic/enable', 'regulator/topic/fan53555', 'regulator/topic/hi6421' and 'regulator/topic/isl9305' into regulator-next
| | | | | * | | regulator: isl9305: REGULATOR_ISL9305 needs to select REGMAP_I2CAxel Lin2014-09-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ERROR: "devm_regmap_init_i2c" [drivers/regulator/isl9305.ko] undefined! Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | regulator: isl9305: Convert to new style DT parsingMark Brown2014-09-101-51/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes some code and replaces it with data. Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | Merge branch 'topic/of' of ↵Mark Brown2014-09-103-3/+62
| | | | | |\ \ \ | | | | | | | |/ | | | | | | |/| | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-isl9305
| | | | | | * | regulator: of: Provide simplified DT parsing methodMark Brown2014-09-103-3/+62
| | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently regulator drivers which support DT all repeat very similar code to supply a list of known regulator identifiers to be matched with DT, convert that to platform data which is then matched up with the regulators as they are registered. This is both fiddly to get right and for devices which can use the standard helpers to provide their operations is the main source of code in the driver. Since this code is essentially identical for most drivers we can factor it out into the core, moving the identifiers in the match table into the regulator descriptors and also allowing drivers to pass in the name of the subnode to search. When a driver provides an of_match string for the regulator the core will attempt to use that to obtain init_data, allowing the driver to remove all explicit code for DT parsing and simply provide data instead. The current code leaks the phandles for the child nodes, this will be addressed incrementally and makes no practical difference for FDT anyway as the DT data structures are never freed. Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | | * | regulator: isl9305: Add Intersil ISL9305/H driverMark Brown2014-09-063-0/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ISL9305 and ISL9305H are mini-PMICs offering two DCDC regulators and two LDO regulators. While there are some register differences between them these do not affect the current Linux driver as the relevant features are not yet supported. Signed-off-by: Mark Brown <broonie@kernel.org>