summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/stpmic1_regulator.c
Commit message (Collapse)AuthorAgeFilesLines
* regulator: stpmic1_regulator: Properly document 'struct stpmic1_regulator_cfg'Lee Jones2020-06-261-1/+1
| | | | | | | | | | | | | | In kerneldoc format, data structures have to start with 'struct' else the kerneldoc tooling/parsers/validators get confused. Fixes the following W=1 kernel build warning: drivers/regulator/stpmic1_regulator.c:25: warning: cannot understand function prototype: 'struct stpmic1_regulator_cfg ' Signed-off-by: Lee Jones <lee.jones@linaro.org> Cc: Pascal Paillet <p.paillet@st.com> Link: https://lore.kernel.org/r/20200626065738.93412-5-lee.jones@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: use linear_ranges helperMatti Vaittinen2020-05-081-9/+9
| | | | | | | | | | | 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>
* regulator: stpmic1: Set a default ramp delay valuePascal Paillet2019-11-151-0/+6
| | | | | | | | | Set a default ramp delay value to the regulators with the worst case value. Signed-off-by: pascal paillet <p.paillet@st.com> Link: https://lore.kernel.org/r/20191113161529.27739-1-p.paillet@st.com Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge branch 'regulator-5.0' into regulator-5.1 stpmic1 const/rangeMark Brown2019-02-191-2/+3
|\
| * regulator: stpmic1: Change buck1 voltage rangePascal PAILLET-LME2019-02-191-3/+4
| | | | | | | | | | | | | | Change buck1 voltage range to be conform with the data-sheet. Signed-off-by: pascal paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: stpmic1: Add active discharge supportPascal PAILLET-LME2019-02-191-13/+55
| | | | | | | | | | | | | | Add support for active discharge for USB power switches. Signed-off-by: pascal paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: stpmic1: Remove support for regulator pull downPascal PAILLET-LME2019-02-191-12/+0
| | | | | | | | | | | | | | | | Regulator high pull down are enabled by default so remove support in the driver. Signed-off-by: pascal paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: stpmic1: Simplify regulators registrationPascal PAILLET-LME2019-02-191-116/+52
| | | | | | | | | | | | | | | | | | Stop using a regulator_init callback. This leads to a more simple regulator registration code. This also permits to spuress struct stpmic1_regulator. Also rename stpmic1_regulators_matches to stpmic1_matches. Signed-off-by: pascal paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: stpmic1: Use regulator mode definition from bindingsPascal PAILLET-LME2019-02-191-3/+2
| | | | | | | | | | | | | | Get the regulator mode definition from the bindings header. Signed-off-by: pascal paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: stpmic1: Remove regul_id and *regmap from struct stpmic1_regulatorAxel Lin2019-02-181-8/+4
| | | | | | | | | | | | | | | | | | At the context with *rdev available, regulator core provides rdev_get_id()/rdev_get_regmap() APIs to get regulator id and *regmap. So no need to store them in struct stpmic1_regulator. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | regulator: stpmic1: Add static const qualifier at peroper placesAxel Lin2019-01-231-21/+17
|/ | | | | | | | | | The regulator_linear_range arrays and stpmic1_regulator_cfgs are only accessed by this driver and the values are never changed so make them static const. regulator_ops variables can also be const. Also clean up a few empty lines in regulator_linear_range array. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: stpmic1: fix regulator_lock usagePascal PAILLET-LME2018-12-031-1/+1
| | | | | | | fix a compilation issue due to regulator_lock usage. Signed-off-by: Pascal Paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: core: Use ww_mutex for regulators lockingDmitry Osipenko2018-11-191-2/+2
| | | | | | | | | Wait/wound mutex shall be used in order to avoid lockups on locking of coupled regulators. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Suggested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid modeAxel Lin2018-10-101-1/+1
| | | | | | | | -EINVAL is not a valid return value for .of_map_mode, return REGULATOR_MODE_INVALID instead. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* regulator: stpmic1: add stpmic1 regulator driverpascal paillet2018-10-081-0/+674
The stpmic1 PMIC embeds several regulators and switches with different capabilities. Signed-off-by: pascal paillet <p.paillet@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>