summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/bd71815-regulator.c
AgeCommit message (Collapse)AuthorFilesLines
2021-10-04regulator: bd71815: Use defined mask valuesMatti Vaittinen1-2/+2
Consistently use the defines for buck control mask values. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/YVqpujZLZmaiqwe8@fedora Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08regulator: bd71815: Get rid of struct bd71815_pmicAxel Lin1-38/+19
The content of bd71815_regulators is never changed, no need to duplicate it, thus remove descs[BD71815_REGULATOR_CNT]. The *regmap, *dev and *rdev[BD71815_REGULATOR_CNT] are not really needed. The *gps is unused. Thus the struct bd71815_pmic can be removed. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20210607143002.1600017-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27regulator: bd71815: fix platform_no_drv_owner.cocci warningsZou Wei1-1/+0
./drivers/regulator/bd71815-regulator.c:644:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> Acked-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Message-Id: <1622109244-54739-1-git-send-email-zou_wei@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-18regulator: bd71815: Fix missing include filesAxel Lin1-0/+2
Include linux/of.h and linux/gpio/consumer.h to fix below errors: error: implicit declaration of function ‘of_match_ptr’ error: implicit declaration of function ‘devm_gpiod_get_from_of_node’ Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Link: https://lore.kernel.org/r/20210518114843.1495152-1-axel.lin@ingics.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-14regulator: Support ROHM BD71815 regulatorsMatti Vaittinen1-0/+652
Support voltage control for regulators on ROHM BD71815 PMIC. ROHM BD71815 contains 5 bucks, 7 LDOs and a boost (intended for LED). Bucks 1 and 2 support HW state based voltage level and enable states. Other regulators support HW state based enable states. All bucks and LDOs 1-5 allow voltage changes for RUN state and LDO4 can be enabled/disabled via GPIO. LDO3 does support changing between two predetermined voltages by using a GPIO but this functionality is not included in this commit. This work is derived from driver originally written by Tony Luo <luofc@embedinfo.com> - although not much of original work is left. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Lee Jones <lee.jones@linaro.org>