aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/max77620-regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2021-05-24regulator: max77620: Silence deferred probe errorDmitry Osipenko1-6/+4
One of previous changes to regulator core causes PMIC regulators to re-probe until supply regulator is registered. Silence noisy error message about the deferred probe. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210523224243.13219-3-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-24regulator: max77620: Use device_set_of_node_from_dev()Dmitry Osipenko1-0/+7
The MAX77620 driver fails to re-probe on deferred probe because driver core tries to claim resources that are already claimed by the PINCTRL device. Use device_set_of_node_from_dev() helper which marks OF node as reused, skipping erroneous execution of pinctrl_bind_pins() for the PMIC device on the re-probe. Fixes: aea6cb99703e ("regulator: resolve supply after creating regulator") Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210523224243.13219-2-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-03regulator: max77620: remove redundant assignment to variable retColin Ian King1-1/+1
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20190703082009.18779-1-colin.king@canonical.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-18Merge tag 'v5.2-rc4' into regulator-5.3Mark Brown1-4/+1
Linux 5.2-rc4
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422Thomas Gleixner1-4/+1
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-05-28regulator: max77620: Support Maxim 77663Dmitry Osipenko1-1/+25
Add support for Maxim 77663. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-25regulator: max77620: Fix regulator info setting for max20024Axel Lin1-1/+1
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 Lin1-0/+2
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 Zhang1-1/+9
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 Goyal1-1/+1
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 Talla1-0/+46
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 Talla1-1/+0
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 Talla1-1/+6
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 Dewangan1-27/+56
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 Dewangan1-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>
2016-02-26regulator: max77620: Remove duplicate module aliasAxel Lin1-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>
2016-02-26regulator: max77620: Eliminate duplicate codeAxel Lin1-13/+7
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-02-26regulator: max77620: Remove unused fieldsAxel Lin1-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>
2016-02-20regulator: max77620: add regulator driver for max77620/max20024Laxman Dewangan1-0/+825
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>