summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77620-regulator.c
AgeCommit message (Collapse)Author
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422Thomas Gleixner
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms and conditions 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 101 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190531190113.822954939@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25regulator: max77620: Fix regulator info setting for max20024Axel Lin
Current code always set pmic->rinfo[id] = &max77620_regs_info[id]; It should set to either max77620_regs_info or max20024_regs_info depends on the chip_id. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-20regulator: max77620: Add missing .owner field in regulator_descAxel Lin
Add missing .owner field in regulator_desc, which is used for refcounting. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-10regulator: max77620: Initialize values for DT propertiesMark Zhang
If regulator DT node doesn't exist, its of_parse_cb callback function isn't called. Then all values for DT properties are filled with zero. This leads to wrong register update for FPS and POK settings. Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com> Signed-off-by: Mark Zhang <markz@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2017-01-31regulator: max77620-regulator: constify regulator_ops structureBhumika Goyal
Declare regulator_ops structure as const as it is only stored in the ops field of a regulator_desc structure. This field is of type const, so regulator_ops structures having this property can be made const too. File size before: drivers/regulator/max77620-regulator.o text data bss dec hex filename 4811 6992 0 11803 2e1b regulator/max77620-regulator.o File size after: drivers/regulator/max77620-regulator.o text data bss dec hex filename 5075 6720 0 11795 2e13 regulator/max77620-regulator.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-23regulator: max77620: add support to configure MPOKVenkat Reddy Talla
Adding support to configure regulator POK mapping bit to control nRST_IO and GPIO1 POK function. In tegra based platform which uses MAX20024 pmic, when some of regulators are configured FPS_NONE(flexible power sequencer) causes PMIC GPIO1 to go low which lead to various other rails turning off, to avoid this MPOK bit of those regulators need to be set to 0 so that PMIC GPIO1 will not go low. Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-15regulator: max77620: remove unused variableVenkat Reddy Talla
max77620_reuglator_pdata structure variable reg_idata is not used anywhere in the regulator driver, so removing it. Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-29regulator: max77620: check for valid regulator infoVenkat Reddy Talla
SD4 regulator is not registered with regulator core framework in probe as there is no support in MAX77620 PMIC, removing SD4 entry from MAX77620 regulator information list and checking for valid regulator information data before configuring FPS source and FPS power up/down period to avoid NULL pointer exception if regulator not registered with core. Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-04-22regulator: max77620: Add support for device specific ramp rate settingLaxman Dewangan
Maxim advertised the ramp rate of the rail with some recommended design specification like output capacitance of rail should be 2.2uF. This make sure that current change in the rail is within maximum current limit and hence meet the advertised ramp rate. If there is variation in design which causes the rail current to change more that maximum current limit then device applies the current limit. In this case, ramp rate is different than advertised ramp rate. Add device specific settings for ramp rate which need to be configure on device register when measure ramp rate on platform is deviated from advertised ramp rate. In this case, all delay time calculation for voltage change is done with measured ramp rate and device ramp rate is used for configuring the device register. If measured ramp rate in the platform is same as advertised ramp rate then regulator-ramp-delay is used for the device register configuration and ramp time calculation for voltage change. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-03-02regulator: max77620: Add support to configure active-dischargeLaxman Dewangan
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>
2016-02-26regulator: max77620: Remove duplicate module aliasAxel Lin
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>
2016-02-26regulator: max77620: Eliminate duplicate codeAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-26regulator: max77620: Remove unused fieldsAxel Lin
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>
2016-02-20regulator: max77620: add regulator driver for max77620/max20024Laxman Dewangan
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>