Re: [PATCH v10 2/2] regulator: willsemi,wl2868c: add the WL2868C camera PMIC driver

From: Mark Brown

Date: Wed Nov 11 2026 - 13:16:40 EST


> The WL2868C is an I2C camera power management IC with seven LDOs.
> LDO1 and LDO2 are fed from VIN12 and cover 0.496 V to 1.512 V with a
> 7-bit voltage selector; LDO3 and LDO4 share VIN34, and LDO5 to LDO7
> have one input each, covering 1.504 V to 3.544 V with an 8-bit
> selector. All outputs step by 8 mV.

> + /*
> + * Seed the tracked set with the outputs the firmware left enabled, so
> + * that the first enable() or disable() of any output preserves them.
> + * SYS_EN gates the whole chip: while it is clear no output is up, the
> + * per-LDO bits are only presets and is_enabled() reports every output
> + * as off. Seeding them in that state would make the first enable() of
> + * any single output switch all the presets on.
> + */
> + ret = regmap_read(config.regmap, WL2868C_LDO_ENABLE, &value);
> + if (ret)
> + return dev_err_probe(dev, ret, "Failed to read the enable register\n");
> +
> + if (value & WL2868C_SYS_ENABLE)
> + chip->enabled = value & WL2868C_LDO_ENABLE_MASK;

Should the driver not also override the LDOx_SEQ registers to make sure
we have software control of them, or hide the enable/disable ops if
they're non-zero?

--
Mark Brown <broonie@xxxxxxxxxx>