aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/stpmic1_regulator.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-02-19Merge branch 'regulator-5.0' into regulator-5.1 stpmic1 const/rangeMark Brown1-2/+3
2019-02-19regulator: stpmic1: Change buck1 voltage rangePascal PAILLET-LME1-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>
2019-02-19regulator: stpmic1: Add active discharge supportPascal PAILLET-LME1-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>
2019-02-19regulator: stpmic1: Remove support for regulator pull downPascal PAILLET-LME1-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>
2019-02-19regulator: stpmic1: Simplify regulators registrationPascal PAILLET-LME1-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>
2019-02-19regulator: stpmic1: Use regulator mode definition from bindingsPascal PAILLET-LME1-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>
2019-02-18regulator: stpmic1: Remove regul_id and *regmap from struct stpmic1_regulatorAxel Lin1-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>
2019-01-23regulator: stpmic1: Add static const qualifier at peroper placesAxel Lin1-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>
2018-12-03regulator: stpmic1: fix regulator_lock usagePascal PAILLET-LME1-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>
2018-11-19regulator: core: Use ww_mutex for regulators lockingDmitry Osipenko1-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>
2018-10-10regulator: stpmic1: Return REGULATOR_MODE_INVALID for invalid modeAxel Lin1-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>
2018-10-08regulator: stpmic1: add stpmic1 regulator driverpascal paillet1-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>