Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8bd31df8 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'regulator/topic/const',...

Merge remote-tracking branches 'regulator/topic/const', 'regulator/topic/lm363x', 'regulator/topic/lockdep' and 'regulator/topic/lp872x' into regulator-next
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
TI LMU LM363x regulator device tree bindings

LM363x regulator driver supports LM3631 and LM3632.
LM3631 has five regulators and LM3632 supports three regulators.

Required property:
  - compatible: "ti,lm363x-regulator"

Optional properties:
  LM3632 has external enable pins for two LDOs.
  - ti,lcm-en1-gpio: A GPIO specifier for Vpos control pin.
  - ti,lcm-en2-gpio: A GPIO specifier for Vneg control pin.

Child nodes:
  LM3631
  - vboost
  - vcont
  - voref
  - vpos
  - vneg

  LM3632
  - vboost
  - vpos
  - vneg

  Optional properties of a child node:
  Each sub-node should contain the constraints and initialization.
  Please refer to [1].

Examples: Please refer to ti-lmu dt-bindings [2].

[1] ../regulator/regulator.txt
[2] ../mfd/ti-lmu.txt
+9 −0
Original line number Diff line number Diff line
@@ -274,6 +274,15 @@ config REGULATOR_ISL6271A
	help
	  This driver supports ISL6271A voltage regulator chip.

config REGULATOR_LM363X
	tristate "TI LM363X voltage regulators"
	depends on MFD_TI_LMU
	help
	  This driver supports LM3631 and LM3632 voltage regulators for
	  the LCD bias.
	  One boost output voltage is configurable and always on.
	  Other LDOs are used for the display module.

config REGULATOR_LP3971
	tristate "National Semiconductors LP3971 PMIC regulator driver"
	depends on I2C
+1 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ obj-$(CONFIG_REGULATOR_GPIO) += gpio-regulator.o
obj-$(CONFIG_REGULATOR_HI6421) += hi6421-regulator.o
obj-$(CONFIG_REGULATOR_ISL6271A) += isl6271a-regulator.o
obj-$(CONFIG_REGULATOR_ISL9305) += isl9305.o
obj-$(CONFIG_REGULATOR_LM363X) += lm363x-regulator.o
obj-$(CONFIG_REGULATOR_LP3971) += lp3971.o
obj-$(CONFIG_REGULATOR_LP3972) += lp3972.o
obj-$(CONFIG_REGULATOR_LP872X) += lp872x.o
+9 −1
Original line number Diff line number Diff line
@@ -132,6 +132,14 @@ static bool have_full_constraints(void)
	return has_full_constraints || of_have_populated_dt();
}

static inline struct regulator_dev *rdev_get_supply(struct regulator_dev *rdev)
{
	if (rdev && rdev->supply)
		return rdev->supply->rdev;

	return NULL;
}

/**
 * regulator_lock_supply - lock a regulator and its supplies
 * @rdev:         regulator source
@@ -140,7 +148,7 @@ static void regulator_lock_supply(struct regulator_dev *rdev)
{
	int i;

	for (i = 0; rdev->supply; rdev = rdev->supply->rdev, i++)
	for (i = 0; rdev; rdev = rdev_get_supply(rdev), i++)
		mutex_lock_nested(&rdev->mutex, i);
}

+5 −5
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ static const struct regulator_linear_range da9034_ldo12_ranges[] = {
	REGULATOR_LINEAR_RANGE(2700000, 8, 15, 50000),
};

static struct regulator_ops da903x_regulator_ldo_ops = {
static const struct regulator_ops da903x_regulator_ldo_ops = {
	.set_voltage_sel = da903x_set_voltage_sel,
	.get_voltage_sel = da903x_get_voltage_sel,
	.list_voltage	= regulator_list_voltage_linear,
@@ -268,7 +268,7 @@ static struct regulator_ops da903x_regulator_ldo_ops = {
};

/* NOTE: this is dedicated for the insane DA9030 LDO14 */
static struct regulator_ops da9030_regulator_ldo14_ops = {
static const struct regulator_ops da9030_regulator_ldo14_ops = {
	.set_voltage_sel = da903x_set_voltage_sel,
	.get_voltage_sel = da903x_get_voltage_sel,
	.list_voltage	= da9030_list_ldo14_voltage,
@@ -279,7 +279,7 @@ static struct regulator_ops da9030_regulator_ldo14_ops = {
};

/* NOTE: this is dedicated for the DA9030 LDO1 and LDO15 that have locks  */
static struct regulator_ops da9030_regulator_ldo1_15_ops = {
static const struct regulator_ops da9030_regulator_ldo1_15_ops = {
	.set_voltage_sel = da9030_set_ldo1_15_voltage_sel,
	.get_voltage_sel = da903x_get_voltage_sel,
	.list_voltage	= regulator_list_voltage_linear,
@@ -289,7 +289,7 @@ static struct regulator_ops da9030_regulator_ldo1_15_ops = {
	.is_enabled	= da903x_is_enabled,
};

static struct regulator_ops da9034_regulator_dvc_ops = {
static const struct regulator_ops da9034_regulator_dvc_ops = {
	.set_voltage_sel = da9034_set_dvc_voltage_sel,
	.get_voltage_sel = da903x_get_voltage_sel,
	.list_voltage	= regulator_list_voltage_linear,
@@ -300,7 +300,7 @@ static struct regulator_ops da9034_regulator_dvc_ops = {
};

/* NOTE: this is dedicated for the insane LDO12 */
static struct regulator_ops da9034_regulator_ldo12_ops = {
static const struct regulator_ops da9034_regulator_ldo12_ops = {
	.set_voltage_sel = da903x_set_voltage_sel,
	.get_voltage_sel = da903x_get_voltage_sel,
	.list_voltage	= regulator_list_voltage_linear_range,
Loading