summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* regulator: refactor valid_ops_mask checking codeWEN Pingbo2016-04-251-59/+29
| | | | | | | | | To make the code more compat and centralized, this patch add a unified function - regulator_ops_is_valid. So we can add some extra checking code easily later. Signed-off-by: WEN Pingbo <pingbo.wen@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: core: Log when we bring constraints into rangeMark Brown2016-03-301-0/+2
| | | | | | | | This aids in debugging problems triggered by the regulator core applying its constraints, we could potentially crash immediately after updating the voltage if the constraints are buggy. Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: core: Ensure we are at least in bounds for our constraintsMark Brown2016-03-272-8/+26
| | | | | | | | | | | | | Currently we only attempt to set the voltage during constraints application if an exact voltage is specified. Extend this so that if the currently set voltage for the regulator is outside the bounds set in constraints we will move the voltage to the nearest constraint, raising to the minimum or lowering to the maximum as needed. This ensures that drivers can probe without the hardware being driven out of spec. Reported-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Tested-by: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: core: Always flag voltage constraints as appliableMark Brown2016-03-221-4/+2
| | | | | | | | Allow the core to always use the voltage constraints to set the voltage on startup. A forthcoming change in that code will ensure that we bring out of constraints voltages into spec with this setting. Signed-off-by: Mark Brown <broonie@kernel.org>
*-. Merge remote-tracking branches 'regulator/topic/s5m8767' and ↵Mark Brown2016-03-133-5/+10
|\ \ | | | | | | | | | 'regulator/topic/vexpress' into regulator-next
| | * regulator: vexpress: rename vexpress regulator implementationSudeep Holla2016-02-152-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vexpress regulator implementation is currently just called vexpress. This is a problem because it clashes with another module with the same name in hardware monitors. This patch renames the vexpress regulator implementation to vexpress-regulator so that there will be no clash in the module namespace. Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Reported-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: s5m8767: fix get_register() error handlingArnd Bergmann2016-02-161-4/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The s5m8767_pmic_probe() function calls s5m8767_get_register() to read data without checking the return code, which produces a compile-time warning when that data is accessed: drivers/regulator/s5m8767.c: In function 's5m8767_pmic_probe': drivers/regulator/s5m8767.c:924:7: error: 'enable_reg' may be used uninitialized in this function [-Werror=maybe-uninitialized] drivers/regulator/s5m8767.c:944:30: error: 'enable_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] This changes the s5m8767_get_register() function to return a -EINVAL not just for an invalid register number but also for an invalid regulator number, as both would result in returning uninitialized data. The s5m8767_pmic_probe() function is then changed accordingly to fail on a read error, as all the other callers of s5m8767_get_register() already do. In practice this probably cannot happen, as we don't call s5m8767_get_register() with invalid arguments, but the gcc warning seems valid in principle, in terms writing safe error checking. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 9c4c60554acf ("regulator: s5m8767: Convert to use regulator_[enable|disable|is_enabled]_regmap") Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
| \
| \
| \
| \
*-------. \ Merge remote-tracking branches 'regulator/topic/mt6397', ↵Mark Brown2016-03-135-40/+70
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'regulator/topic/of', 'regulator/topic/pv88060', 'regulator/topic/pwm' and 'regulator/topic/s2mps11' into regulator-next
| | | | | * | regulator: s2mps11: Use local variable for number of regulatorsKrzysztof Kozlowski2016-02-191-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the s2mps11_info.rdev_num because it is not used outside of probe. Suggested-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | regulator: s2mps11: Simplify expression used in BUILD_BUG_ONKrzysztof Kozlowski2016-02-181-4/+5
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following BUILD_BUG_ON using a variable fails for some of the compilers and optimization levels (reported for gcc 4.9): var = ARRAY_SIZE(s2mps15_regulators); BUILD_BUG_ON(S2MPS_REGULATOR_MAX < var); Fix this by using ARRAY_SIZE directly. Additionally add missing BUILD_BUG_ON check for S2MPS15 device (the check ensures that internal arrays are big enough to hold data for all of regulators on all devices). Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Tested-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | regulator: pwm: Add support to have multiple instance of pwm regulatorLaxman Dewangan2016-03-121-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of platforms like Nvidia's Tegra210 Jetson-TX1 platform has multiple PMW based regulators. Add support to have multiple instances of the driver by not changing any global data of pwm regulator and if required, making instance specific copy and then making changes. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | regulator: pwm: Fix calculation of voltage-to-duty cycleLaxman Dewangan2016-03-121-1/+1
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With following equation for calculating voltage_to_duty_cycle_percentage 100 - (((req_uV * 100) - (min_uV * 100)) / diff); we get 0% for max_uV and 100% for min_uV. Correcting this to ((req_uV * 100) - (min_uV * 100)) / diff; to get proper duty cycle. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / regulator: pv88060: fix incorrect clear of event registerJames Ban2016-03-081-4/+4
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | This is a patch to fix incorrect clear of event register. Signed-off-by: James Ban <James.Ban.opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * / regulator: of: Use of_property_read_u32() for reading min/maxLaxman Dewangan2016-03-121-8/+7
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OF interface provides to read the u32 value via standard interface of_property_read_u32(). Use this API to read "regulator-min-microvolts" and "regulator-max-microvolt". This will make consistent with other property value reads. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: mt6397: Add OF match tableJavier Martinez Canillas2016-01-271-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Documentation/devicetree/bindings/regulator/mt6397-regulator.txt doc mentions that a compatible "mediatek,mt6397-regulator" is required for the MT6397 device node but the driver doesn't provide a OF match table so the platform bus .match fallbacks to match using the driver name instead. This also means that module auto-loading is broken for this driver since the MFD driver that register the device, has a .of_compatible set so the platform .uevent callback reports a OF modalias that's not in the module. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | regulator: mt6397: Add platform device ID tableJavier Martinez Canillas2016-01-271-1/+7
| |/ | | | | | | | | | | | | | | | | | | | | | | | | The platform bus_type .match callback attempts to match the platform device name with an entry on the .id_table if provided and fallbacks to match with the driver's name if a table is not provided. Using a platform device ID to match is more explicit, allows the driver to support more than one device and also the MODULE_DEVICE_TABLE macro can be used to export the module aliases information instead of the MODULE_ALIAS. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
| \
| \
| \
| \
| \
| \
*-------. \ Merge remote-tracking branches 'regulator/topic/ltc3589', ↵Mark Brown2016-03-139-10/+1047
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'regulator/topic/max77620', 'regulator/topic/max77686', 'regulator/topic/max77802' and 'regulator/topic/maxim' into regulator-next
| | | | | * | regulator: Rename files for max77686 and max77802 driversJavier Martinez Canillas2016-02-124-3/+3
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max77686 and max77802 regulator drivers are for sub-devices of a MFD driver for some PMIC blocks. But the same object file name (max77686.o) was used for both the common MFD driver and the max77686 regulator one. This confuses kbuild if both drivers are built as module causing the MFD driver to not be copied when installing the modules. Also, max77{686,802} are a quite generic name for MFD subdevices drivers so it is better to rename them to max77{686,802}-regulator like it's the case for most regulator drivers. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * / regulator: max77802: Fix DT binding document referenceJavier Martinez Canillas2016-02-031-1/+1
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DT binding doc references the max77802 clocks header file which makes no sense since of course it doesn't contain data related to the regulators. It's a copy and paste error, so add a reference to the correct header file. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / regulator: max77686: Fix MAINTAINER entry to match driverJavier Martinez Canillas2016-02-151-1/+1
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The max77686 regulator driver was recently renamed to max77686-regulator but the entry in the MAINTAINERS file wasn't updated to match the driver. Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | regulator: max77620: Add support to configure active-dischargeLaxman Dewangan2016-03-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add regulator ops callback for configuration of active-discharge and provide necessarily information via regulator descriptor. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | regulator: core: Add support for active-discharge configurationLaxman Dewangan2016-03-021-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to enable/disable active discharge of regulator via machine constraints. This configuration is done when setting machine constraint during regulator register and if regulator driver implemented the callback ops. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | Merge branch 'topic/discharge' of ↵Mark Brown2016-03-026-0/+74
| | |\ \ | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-max77620
| | * | | regulator: max77620: Remove duplicate module aliasAxel Lin2016-02-261-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same alias is already in .id_table. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: max77620: Eliminate duplicate codeAxel Lin2016-02-261-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: max77620: Remove unused fieldsAxel Lin2016-02-261-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These fields are never used and not required at all, remove them. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: max77620: add regulator driver for max77620/max20024Laxman Dewangan2016-02-193-0/+835
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAXIM Semiconductor's PMIC, MAX77620 and MAX20024 have the multiple DCDC and LDOs. This supplies the power to different components of the system. Also these rails has configuration for ramp time, flexible power sequence, slew rate etc. Add regulator driver to access these rails via regulator APIs. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: add DT binding doc for regulator of PMIC max77620/max20024Laxman Dewangan2016-02-191-0/+200
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Maxim Semiconductor's PMIC MAX77620/MAX20024 has multiple DCDCs and LDOs. Add DT binding document to support these regulators via regulator framework. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * / | regulator: ltc3589: Make IRQ optionalBernhard Walle2016-02-121-6/+9
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | It's perfectly valid to use the LTC3589 without an interrupt pin connected to it. Currently, the driver probing fails when client->irq is 0 (which means "no interrupt"). Don't register the interrupt handler in that case but successfully finish the device probing instead. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
| \ \
*-------. \ \ Merge remote-tracking branches 'regulator/topic/discharge', ↵Mark Brown2016-03-1315-5/+402
|\ \ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | | | | | | | | 'regulator/topic/fan53555', 'regulator/topic/gpio', 'regulator/topic/hi655x' and 'regulator/topic/lp872x' into regulator-next
| | | | | * | regulator: lp872x: Add enable GPIO pin supportPaul Kocialkowski2016-02-053-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LP872x regulators are made active via the EN pin, which might be hooked to a GPIO. This adds support for driving the GPIO high when the driver is in use. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | regulator: lp872x: Remove warning about invalid DVS GPIOPaul Kocialkowski2016-02-051-3/+1
| | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some devices don't hook the DVS pin to a GPIO but to ground or VCC. In those cases, it is not a problem to have no DVS GPIO provided, as the current code will already switch to software-only DVS selection: When the DVS GPIO is invalid, lp872x_init_dvs jumps to the set_default_dvs_mode label, which instructs the chip not to use the DVS pin at all and do it all in software instead (by clearing the LP8720_EXT_DVS_M bit in the LP872X_GENERAL_CFG register). That is reflected later in the code, when setting the bucks (the DVS pin only applies to the bucks) by checking for the LP8720_EXT_DVS_M bit on the LP872X_GENERAL_CFG register (in lp872x_select_buck_vout_addr) to decide whether to use software or hardware DVS selection. Thus, there is no need to print a warning when the DVS GPIO is invalid. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | regulator: hi655x: enable regulator for hi655x PMICChen Feng2016-02-153-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the regulator driver for hi655x PMIC. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Fei Wang <w.f@huawei.com> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | regulator: hi655x: Document for hi655x regulatorChen Feng2016-02-151-0/+29
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the device tree binding documentation for hi655x PMIC regulator. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Fei Wang <w.f@huawei.com> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * / regulator: gpio: don't print error on EPROBE_DEFERRabin Vincent2016-02-201-2/+4
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't print out an error with the driver sees EPROBE_DEFER when attempting to get the gpio. These errors are usually transient; the probe will be retried later. Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | regulator: fan53555: fill set_suspend_enable/disable callbackzhangqing2016-01-151-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting the set_suspend_enable/disable callback to support enable and disable the dcdc when system is suspend. Signed-off-by: zhangqing <zhangqing@rock-chips.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: helper: Add helper to configure active-discharge using regmapLaxman Dewangan2016-03-022-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add helper function to set the state of active-discharge of regulator using regmap. The HW regulator driver can directly use this by providing the necessary information in the regulator descriptor. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: core: Add support for active-discharge configurationLaxman Dewangan2016-03-024-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to enable/disable active discharge of regulator via machine constraints. This configuration is done when setting machine constraint during regulator register and if regulator driver implemented the callback ops. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: DT: Add DT property for active-discharge configurationLaxman Dewangan2016-03-021-0/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | Add common DT property for regulator node to support of active discharge enable/disable configuration of regulator. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | |
| \ \
| \ \
| \ \
| \ \
| \ \
*-----. \ \ Merge remote-tracking branches 'regulator/topic/act8865', ↵Mark Brown2016-03-139-45/+354
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 'regulator/topic/act8945a', 'regulator/topic/axp20x' and 'regulator/topic/cs4271' into regulator-next
| | | | * | | ASoC: cs4271: add regulator consumer supportPascal Huerst2016-02-262-8/+68
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cs4271 has three power domains: vd, vl and va. Enable them all, as long as the codec is in use. While at it, factored out the reset code into its own function. Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | regulator: axp20x: Use of_match name as default regulator nameChen-Yu Tsai2016-02-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Originally the helper macros used uppercase regulator names, which are primarily used to expand to the regulator ID enum, as the default names. This is aestheticly unpleasent. Since the of_match bits are the same, just lowercase, use that as the default names instead. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | regulator: axp20x: Use linear voltage ranges for AXP20X LDO4Chen-Yu Tsai2016-02-031-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AXP20X datasheet lists the possible voltage settings for LDO4, so it was implemented using a voltage table. Upon closer examination, the valid voltages can be mapped into 3 linear ranges. Move AXP20X LDO4 to use linear ranges. The supporting code can be reused with later AXP8xx PMICs, which have a number of regulators that have 2 linear ranges. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | regulator: axp20x: Remove voltage readout support for switch regulatorsChen-Yu Tsai2016-02-031-11/+3
| | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch-type regulators, such as DC1SW on AXP22X, are a secondary output from DCDC1. They are just an on/off switch, and the driver should not try to read its voltage directly from the DCDC1 control registers. Instead, the core will pass down the voltage from the regulator supply chain. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: add documentation for ACT8945A's regulator DT bindingsWenyou Yang2016-02-051-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds documentation for the DT bindings of the regulator subdevice of ACT8945A MFD. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | regulator: act8945a: add regulator driver for ACT8945AWenyou Yang2016-02-053-0/+175
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds new regulator driver to support ACT8945A MFD chip's regulators. The ACT8945A has three step-down DC/DC converters and four low-dropout regulators. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: act8865: Specify fixed voltage of 3.3V for ACT8600's REG9Maarten ter Huurne2016-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation lists both 1.8V and 3.3V for this regulator output, but 3.3V is mentioned more often and also matches what JZ4770 and JZ4780 expect as an input. Note that the voltage of REG9 is not programmable, so this commit only changes the voltage reported in sysfs and debugfs, not the actual output voltage of the hardware. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: act8865: Rename platform_data field to init_dataMaarten ter Huurne2016-02-292-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the field name match its type. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | | regulator: act8865: Remove "static" from local variableMaarten ter Huurne2016-02-291-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | There is no need to preserve its value between calls. I guess this was a copy-paste slip-up. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* | | Merge remote-tracking branch 'regulator/topic/core' into regulator-nextMark Brown2016-03-131-13/+13
|\ \ \