diff options
| author | Mark Brown <broonie@kernel.org> | 2026-02-05 00:07:58 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-02-05 00:07:58 +0000 |
| commit | 914809c666d6c96d130da4755daa5bb0a57f0e12 (patch) | |
| tree | 9412448ea5f713032d0c18f7664f073988d21a71 /include/linux/regulator | |
| parent | 20c4701b75a3d6ce09d61e17125aefe77e7eb333 (diff) | |
| parent | fe8429a2717fc01082502b0adf680a50b230eff7 (diff) | |
Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Merge series from André Draszik <andre.draszik@linaro.org>:
This series extends the existing S2MPG10 PMIC driver to add support for
the regulators, and adds new S2MPG11 core and regulator drivers.
The patches are kept together in one series, due to S2MPG11 and its
regulators being very similar to S2MPG10.
The Samsung S2MPG11 PMIC is a Power Management IC for mobile
applications with buck converters, various LDOs, power meters, and
additional GPIO interfaces. It typically complements an S2MPG10 PMIC in
a main/sub configuration as the sub-PMIC and both are used on the
Google Pixel 6 and 6 Pro (oriole / raven).
A DT update for Oriole / Raven to enable these is required which I will
send out separately.
Diffstat (limited to 'include/linux/regulator')
| -rw-r--r-- | include/linux/regulator/driver.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 09f3b67638f9..cc6ce709ec86 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -53,6 +53,11 @@ enum regulator_detection_severity { #define REGULATOR_LINEAR_RANGE(_min_uV, _min_sel, _max_sel, _step_uV) \ LINEAR_RANGE(_min_uV, _min_sel, _max_sel, _step_uV) +/* Initialize struct linear_range using voltages, not selectors */ +#define REGULATOR_LINEAR_VRANGE(_offs_uV, _min_uV, _max_uV, _step_uV) \ + LINEAR_RANGE(_min_uV, ((_min_uV) - (_offs_uV)) / (_step_uV), \ + ((_max_uV) - (_offs_uV)) / (_step_uV), _step_uV) + /** * struct regulator_ops - regulator operations. * |
