summaryrefslogtreecommitdiff
path: root/drivers/regulator/hi6421-regulator.c
AgeCommit message (Collapse)Author
2020-07-22regulator: Replace HTTP links with HTTPS onesAlexander A. Klimov
Rationale: Reduces attack surface on kernel devs opening the links for MITM as HTTPS traffic is much harder to manipulate. Deterministic algorithm: For each file: If not .svg: For each line: If doesn't contain `\bxmlns\b`: For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`: If both the HTTP and HTTPS versions return 200 OK and serve the same content: Replace HTTP with HTTPS. Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Acked-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20200719200623.61524-1-grandmaster@al2klimov.de Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-08regulator: use linear_ranges helperMatti Vaittinen
Change the regulator helpers to use common linear_ranges code. Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> Reviewed-by: Mark Brown <broonie@kernel.org> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Link: https://lore.kernel.org/r/64f01d5e381b8631a271616b7790f9d5640974fb.1588944082.git.matti.vaittinen@fi.rohmeurope.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-05-02regulator: hi6xxx: Switch to SPDX identifierAxel Lin
Convert HiSilicon hi6xxx PMIC drivers to SPDX identifier. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-04-11regulator: hi6421: Convert to use simplified DT parsingAxel Lin
Use regulator core's simplified DT parsing code to simply the driver implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-06-07regulator: hi6421: Describe consumed platform deviceGuodong Xu
The hi6421-regulator driver consumes a similarly named platform device. Adding that to the module device table, allows modprobe to locate this driver once the device is created. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-09-01regulator: hi6421: mark hi6421_regulator_ldo_get_optimum_mode() staticBaoyou Xie
We get 1 warning when building kernel with W=1: drivers/regulator/hi6421-regulator.c:480:14: warning: no previous prototype for 'hi6421_regulator_ldo_get_optimum_mode' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-10-20regulator: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-09-06regulator: hi6421: Fix misleading commentAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-09-05regulator: hi6421: Fix misleading commentAxel Lin
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-08-21regulator: hi6421: Remove unused fields from struct hi6421_regulator_infoAxel Lin
The valid_modes_mask and *dev are not used in this driver, remove them. Current code uses devm_regulator_register, so we don't need *regulator in hi6421_regulator_info. Use a local variable instead. Also removes a few unnecessary inclusion of header files. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-19regulator: hi6421: style fix, else with a single return is not requiredGuodong Xu
style fix for warnings. 'else' with a single 'return' is usually not required. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-08-16regulator: add driver for hi6421 voltage regulatorGuodong Xu
Add driver support for HiSilicon Hi6421 voltage regulators. Two rules for regulator enabling are defined in hi6421 spec: 1) Between disable and enable of each regulator (LDOs or BUCKs), there must be a protection gap. Use @off_on_delay of regulator core to implement this. 2) No two regulators can be enabled at the same time. Use mutex in hi6421_regulator_pdata to ensure this. A protection gap of 100us is added into each LDO/BUCK's .enable_time. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>