Re: [PATCH 1/3] regulator: don't cache vsel to ensure voltage setting

From: Mark Brown
Date: Thu May 16 2024 - 07:33:48 EST


On Thu, May 16, 2024 at 11:53:46AM +0300, Matti Vaittinen wrote:

> + /*
> + * Some PMICs treat the vsel_reg same as apply-bit. Force it
> + * to be written even if the old selector were same as the new
> + * (but range changed) by using regmap_write_bits() and not the
> + * regmap_update_bits().
> + */
> + ret = regmap_write_bits(rdev->regmap, rdev->desc->vsel_reg,
> + rdev->desc->vsel_mask, sel);

This feels like a special case for those devices, for devices that don't
have this behaviour it'd be a regression in that it'd increase I/O
traffic. At least this should be specialised to only devices that have
ranges I think?

Attachment: signature.asc
Description: PGP signature