regulator: Updates for v7.0

There's a bunch of new drivers here, plus a lot of hardening for the
 supply resolution code which allow us to support systems where we have
 two PMICs each of which has regulators supplied by the other.  This did
 work a long time ago but got broken as part of improved integration with
 the device model, it's fairly rare so nobody noticed.
 
  - Improvements for supply handling from André Draszik to allow systems
    with two PMICs with supply/consumer relationships in both
    directions to instantiate.
  - New drivers for Maxim MAX776750, Realtek RT8902, Samsung S2MPG11,
    Texas Instuments TPS65185.
 
 This have also pulls in some MFD updates which are build dependencies
 for the Samsung S2MPG11 support.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmmJ8RMACgkQJNaLcl1U
 h9D42Af/Xw+osom1EXqU1IDuxuKQXKE9GXvHJ+OV2uWaPJE8qy5q1ZNJ38HyMBRW
 cuFxfPlUJA/xR47WSvK7LVkHutZVMBIohkhahueP218fDVoQmlxSChcbM8VBzoHW
 NJ3TY+rzhHN5O7r00rPfUuxdQwjkGha122xGsxmzzfXUYpKOZ1jxSInR8BibIAc/
 0fmz61OAgpgBXMX+dTZvD8usVW4vzCvaYWX0CfdaViDuz72kZn8I1iFWzxQEDS7W
 /KGq7WLkyG5x2wzZ6kySKjeq4nWKR1lURMU0KJ6bjW9U/RN3PCpZREJjWNLlUUGJ
 ApltpBz5fXJ+tt6/IonwVL6YwjRXpw==
 =vcqU
 -----END PGP SIGNATURE-----

Merge tag 'regulator-v6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator updates from Mark Brown:
 "There's a bunch of new drivers here, plus a lot of hardening for the
  supply resolution code which allow us to support systems where we have
  two PMICs each of which has regulators supplied by the other. This did
  work a long time ago but got broken as part of improved integration
  with the device model, it's fairly rare so nobody noticed.

   - Improvements for supply handling from André Draszik to allow
     systems with two PMICs with supply/consumer relationships in both
     directions to instantiate.

   - New drivers for Maxim MAX776750, Realtek RT8902, Samsung S2MPG11,
     Texas Instuments TPS65185.

  This have also pulls in some MFD updates which are build dependencies
  for the Samsung S2MPG11 support"

* tag 'regulator-v6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (42 commits)
  regulator: s2mps11: more descriptive gpio consumer name
  regulator: s2mps11: add S2MPG11 regulator
  regulator: s2mps11: refactor S2MPG10 regulator macros for S2MPG11 reuse
  regulator: s2mps11: refactor S2MPG10 ::set_voltage_time() for S2MPG11 reuse
  regulator: s2mps11: add S2MPG10 regulator
  regulator: s2mps11: refactor handling of external rail control
  regulator: s2mps11: update node parsing (allow -supply properties)
  regulator: s2mps11: place constants on right side of comparison tests
  regulator: s2mps11: use dev_err_probe() where appropriate
  regulator: s2mps11: drop two needless variable initialisations
  regulator: add REGULATOR_LINEAR_VRANGE macro
  regulator: dt-bindings: add s2mpg11-pmic regulators
  regulator: dt-bindings: add s2mpg10-pmic regulators
  dt-bindings: firmware: google,gs101-acpm-ipc: convert regulators to lowercase
  mfd: sec: Add support for S2MPG11 PMIC via ACPM
  mfd: sec: s2mpg10: Reorder regulators for better probe performance
  dt-bindings: mfd: Add samsung,s2mpg11-pmic
  dt-bindings: mfd: samsung,s2mpg10-pmic: Link to its regulators
  dt-bindings: mfd: samsung,s2mps11: Split s2mpg10-pmic into separate file
  mfd: sec: Drop now unused struct sec_pmic_dev::irq_data
  ...
This commit is contained in:
Linus Torvalds 2026-02-11 09:40:12 -08:00
commit f6c42489fe
34 changed files with 4974 additions and 343 deletions

View file

@ -4,48 +4,52 @@
#ifndef CONFIG_REGULATOR
void rust_helper_regulator_put(struct regulator *regulator)
__rust_helper void rust_helper_regulator_put(struct regulator *regulator)
{
regulator_put(regulator);
}
int rust_helper_regulator_set_voltage(struct regulator *regulator, int min_uV,
int max_uV)
__rust_helper int rust_helper_regulator_set_voltage(struct regulator *regulator,
int min_uV, int max_uV)
{
return regulator_set_voltage(regulator, min_uV, max_uV);
}
int rust_helper_regulator_get_voltage(struct regulator *regulator)
__rust_helper int rust_helper_regulator_get_voltage(struct regulator *regulator)
{
return regulator_get_voltage(regulator);
}
struct regulator *rust_helper_regulator_get(struct device *dev, const char *id)
__rust_helper struct regulator *rust_helper_regulator_get(struct device *dev,
const char *id)
{
return regulator_get(dev, id);
}
int rust_helper_regulator_enable(struct regulator *regulator)
__rust_helper int rust_helper_regulator_enable(struct regulator *regulator)
{
return regulator_enable(regulator);
}
int rust_helper_regulator_disable(struct regulator *regulator)
__rust_helper int rust_helper_regulator_disable(struct regulator *regulator)
{
return regulator_disable(regulator);
}
int rust_helper_regulator_is_enabled(struct regulator *regulator)
__rust_helper int rust_helper_regulator_is_enabled(struct regulator *regulator)
{
return regulator_is_enabled(regulator);
}
int rust_helper_devm_regulator_get_enable(struct device *dev, const char *id)
__rust_helper int rust_helper_devm_regulator_get_enable(struct device *dev,
const char *id)
{
return devm_regulator_get_enable(dev, id);
}
int rust_helper_devm_regulator_get_enable_optional(struct device *dev, const char *id)
__rust_helper int
rust_helper_devm_regulator_get_enable_optional(struct device *dev,
const char *id)
{
return devm_regulator_get_enable_optional(dev, id);
}

View file

@ -122,12 +122,11 @@ pub fn devm_enable_optional(dev: &Device<Bound>, name: &CStr) -> Result {
///
/// ```
/// # use kernel::prelude::*;
/// # use kernel::c_str;
/// # use kernel::device::Device;
/// # use kernel::regulator::{Voltage, Regulator, Disabled, Enabled};
/// fn enable(dev: &Device, min_voltage: Voltage, max_voltage: Voltage) -> Result {
/// // Obtain a reference to a (fictitious) regulator.
/// let regulator: Regulator<Disabled> = Regulator::<Disabled>::get(dev, c_str!("vcc"))?;
/// let regulator: Regulator<Disabled> = Regulator::<Disabled>::get(dev, c"vcc")?;
///
/// // The voltage can be set before enabling the regulator if needed, e.g.:
/// regulator.set_voltage(min_voltage, max_voltage)?;
@ -166,12 +165,11 @@ pub fn devm_enable_optional(dev: &Device<Bound>, name: &CStr) -> Result {
///
/// ```
/// # use kernel::prelude::*;
/// # use kernel::c_str;
/// # use kernel::device::Device;
/// # use kernel::regulator::{Voltage, Regulator, Enabled};
/// fn enable(dev: &Device) -> Result {
/// // Obtain a reference to a (fictitious) regulator and enable it.
/// let regulator: Regulator<Enabled> = Regulator::<Enabled>::get(dev, c_str!("vcc"))?;
/// let regulator: Regulator<Enabled> = Regulator::<Enabled>::get(dev, c"vcc")?;
///
/// // Dropping an enabled regulator will disable it. The refcount will be
/// // decremented.
@ -193,13 +191,12 @@ pub fn devm_enable_optional(dev: &Device<Bound>, name: &CStr) -> Result {
///
/// ```
/// # use kernel::prelude::*;
/// # use kernel::c_str;
/// # use kernel::device::{Bound, Device};
/// # use kernel::regulator;
/// fn enable(dev: &Device<Bound>) -> Result {
/// // Obtain a reference to a (fictitious) regulator and enable it. This
/// // call only returns whether the operation succeeded.
/// regulator::devm_enable(dev, c_str!("vcc"))?;
/// regulator::devm_enable(dev, c"vcc")?;
///
/// // The regulator will be disabled and put when `dev` is unbound.
/// Ok(())