Commit 9b1111fa authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'regulator-fix-v5.13-rc4' of...

Merge tag 'regulator-fix-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "A collection of fixes for the regulator API that have come up since
  the merge window, including a big batch of fixes from Axel Lin's usual
  careful and detailed review.

  The one stand out fix here is Dmitry Baryshkov's fix for an issue
  where we fail to power on the parents of always on regulators during
  system startup if they weren't already powered on"

* tag 'regulator-fix-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (21 commits)
  regulator: rt4801: Fix NULL pointer dereference if priv->enable_gpios is NULL
  regulator: hi6421v600: Fix .vsel_mask setting
  regulator: bd718x7: Fix the BUCK7 voltage setting on BD71837
  regulator: atc260x: Fix n_voltages and min_sel for pickable linear ranges
  regulator: rtmv20: Fix to make regcache value first reading back from HW
  regulator: mt6315: Fix function prototype for mt6315_map_mode
  regulator: rtmv20: Add Richtek to Kconfig text
  regulator: rtmv20: Fix .set_current_limit/.get_current_limit callbacks
  regulator: hisilicon: use the correct HiSilicon copyright
  regulator: bd71828: Fix .n_voltages settings
  regulator: bd70528: Fix off-by-one for buck123 .n_voltages setting
  regulator: max77620: Silence deferred probe error
  regulator: max77620: Use device_set_of_node_from_dev()
  regulator: scmi: Fix off-by-one for linear regulators .n_voltages setting
  regulator: core: resolve supply for boot-on/always-on regulators
  regulator: fixed: Ensure enable_counter is correct if reg_domain_disable fails
  regulator: Check ramp_delay_table for regulator_set_ramp_delay_regmap
  regulator: fan53880: Fix missing n_voltages setting
  regulator: da9121: Return REGULATOR_MODE_INVALID for invalid mode
  regulator: fan53555: fix TCS4525 voltage calulation
  ...
parents dc255730 cb2381cb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1031,7 +1031,7 @@ config REGULATOR_RT5033
	  current source, LDO and Buck.

config REGULATOR_RTMV20
	tristate "RTMV20 Laser Diode Regulator"
	tristate "Richtek RTMV20 Laser Diode Regulator"
	depends on I2C
	select REGMAP_I2C
	help
+10 −9
Original line number Diff line number Diff line
@@ -28,16 +28,16 @@ static const struct linear_range atc2609a_dcdc_voltage_ranges[] = {

static const struct linear_range atc2609a_ldo_voltage_ranges0[] = {
	REGULATOR_LINEAR_RANGE(700000, 0, 15, 100000),
	REGULATOR_LINEAR_RANGE(2100000, 16, 28, 100000),
	REGULATOR_LINEAR_RANGE(2100000, 0, 12, 100000),
};

static const struct linear_range atc2609a_ldo_voltage_ranges1[] = {
	REGULATOR_LINEAR_RANGE(850000, 0, 15, 100000),
	REGULATOR_LINEAR_RANGE(2100000, 16, 27, 100000),
	REGULATOR_LINEAR_RANGE(2100000, 0, 11, 100000),
};

static const unsigned int atc260x_ldo_voltage_range_sel[] = {
	0x0, 0x1,
	0x0, 0x20,
};

static int atc260x_dcdc_set_voltage_time_sel(struct regulator_dev *rdev,
@@ -411,7 +411,7 @@ enum atc2609a_reg_ids {
	.owner = THIS_MODULE, \
}

#define atc2609a_reg_desc_ldo_range_pick(num, n_range) { \
#define atc2609a_reg_desc_ldo_range_pick(num, n_range, n_volt) { \
	.name = "LDO"#num, \
	.supply_name = "ldo"#num, \
	.of_match = of_match_ptr("ldo"#num), \
@@ -421,6 +421,7 @@ enum atc2609a_reg_ids {
	.type = REGULATOR_VOLTAGE, \
	.linear_ranges = atc2609a_ldo_voltage_ranges##n_range, \
	.n_linear_ranges = ARRAY_SIZE(atc2609a_ldo_voltage_ranges##n_range), \
	.n_voltages = n_volt, \
	.vsel_reg = ATC2609A_PMU_LDO##num##_CTL0, \
	.vsel_mask = GENMASK(4, 1), \
	.vsel_range_reg = ATC2609A_PMU_LDO##num##_CTL0, \
@@ -458,12 +459,12 @@ static const struct regulator_desc atc2609a_reg[] = {
	atc2609a_reg_desc_ldo_bypass(0),
	atc2609a_reg_desc_ldo_bypass(1),
	atc2609a_reg_desc_ldo_bypass(2),
	atc2609a_reg_desc_ldo_range_pick(3, 0),
	atc2609a_reg_desc_ldo_range_pick(4, 0),
	atc2609a_reg_desc_ldo_range_pick(3, 0, 29),
	atc2609a_reg_desc_ldo_range_pick(4, 0, 29),
	atc2609a_reg_desc_ldo(5),
	atc2609a_reg_desc_ldo_range_pick(6, 1),
	atc2609a_reg_desc_ldo_range_pick(7, 0),
	atc2609a_reg_desc_ldo_range_pick(8, 0),
	atc2609a_reg_desc_ldo_range_pick(6, 1, 28),
	atc2609a_reg_desc_ldo_range_pick(7, 0, 29),
	atc2609a_reg_desc_ldo_range_pick(8, 0, 29),
	atc2609a_reg_desc_ldo_fixed(9),
};

+1 −1
Original line number Diff line number Diff line
@@ -334,7 +334,7 @@ BD718XX_OPS(bd71837_buck_regulator_ops, regulator_list_voltage_linear_range,
	    NULL);

BD718XX_OPS(bd71837_buck_regulator_nolinear_ops, regulator_list_voltage_table,
	    regulator_map_voltage_ascend, bd718xx_set_voltage_sel_restricted,
	    regulator_map_voltage_ascend, bd71837_set_voltage_sel_restricted,
	    regulator_get_voltage_sel_regmap, regulator_set_voltage_time_sel,
	    NULL);
/*
+6 −0
Original line number Diff line number Diff line
@@ -1425,6 +1425,12 @@ static int set_machine_constraints(struct regulator_dev *rdev)
	 * and we have control then make sure it is enabled.
	 */
	if (rdev->constraints->always_on || rdev->constraints->boot_on) {
		/* If we want to enable this regulator, make sure that we know
		 * the supplying regulator.
		 */
		if (rdev->supply_name && !rdev->supply)
			return -EPROBE_DEFER;

		if (rdev->supply) {
			ret = regulator_enable(rdev->supply);
			if (ret < 0) {
+2 −1
Original line number Diff line number Diff line
@@ -225,8 +225,9 @@ static int cros_ec_regulator_probe(struct platform_device *pdev)

	drvdata->dev = devm_regulator_register(dev, &drvdata->desc, &cfg);
	if (IS_ERR(drvdata->dev)) {
		ret = PTR_ERR(drvdata->dev);
		dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
		return PTR_ERR(drvdata->dev);
		return ret;
	}

	platform_set_drvdata(pdev, drvdata);
Loading