summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/lm363x-regulator.c
AgeCommit message (Collapse)Author
2019-04-03regulator: lm363x: Constify regulator_opsAxel Lin
The lm363x_boost_voltage_table_ops and lm363x_regulator_voltage_table_ops never need to be modified, make them const so compiler can put them to .rodata. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-03regulator: lm363x: Use proper data type for regmap_read argumentsAxel Lin
regmap_read() takes unsigned int reg and unsigned int *val arguments, use proper data type for these arguments. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08regulator: lm363x: Check return value of gpiod_get_index_optionalAxel Lin
gpiod_get_index_optional can return ERR_PTR, add IS_ERR checking for it. While at it, also remove a redundant NULL test for gpiod in error path. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-12-11regulator: lm363x: Let core handle GPIO descriptorLinus Walleij
Use the gpiod_get() rather than the devm_* version so that the regulator core can handle the lifecycle of these descriptors. Fixes: b2d751b7f69b ("regulator: lm363x: Pass descriptor instead of GPIO number") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-10-15regulator: Fetch enable gpiods nonexclusiveLinus Walleij
Since the core regulator code is treating GPIO descriptors as nonexclusive, i.e. it assumes that the enable GPIO line may be shared with several regulators, let's add the flag introduced for fixing this problem on fixed regulators to all drivers fetching GPIO descriptors to avoid possible regressions. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-24regulator: lm363x: Pass descriptor instead of GPIO numberLinus Walleij
Instead of passing a global GPIO number, pass a descriptor looked up with the standard devm_gpiod_get_index_optional() call. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-03-07regulator: lm363x: Use generic DT property name for external control pinsMilo Kim
Vpos and Vneg LDOs can be enabled or disabled by external GPIOs. Use general DT property 'enable-gpios' for this usage. Two enable pins are differentiable by selecting the index number. Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-30regulator: lm363x: Staticise ldo_cont_enable_timeAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-30regulator: lm363x: Remove struct lm363x_regulator which is not necessaryAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-11-27regulator: add LM363X driverMilo Kim
LM363X regulator driver supports LM3631 and LM3632. LM3631 has 5 regulators. LM3632 provides 3 regulators. One boost output and LDOs are used for the display module. Boost voltage is configurable but always on. Supported operations for LDOs are enabled/disabled and voltage change. Two LDOs of LM3632 can be controlled by external pins. Those are configured through the DT properties. Signed-off-by: Milo Kim <milo.kim@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>