[PATCH v2] regulator: mt6363: Serialize BUCK_TOP key access

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Mon Nov 23 01:42:03 PST 2026


On 11/13/26 06:29, Alexandre Mergnat wrote:
> The bits that select the FAST mode of the bucks only accept writes
> while the BUCK_TOP key is unlocked. mt6363_regulator_set_mode() unlocks
> the key, updates the bit and locks the key again, but the regulator
> core only locks the buck being changed. When two bucks change mode at
> the same time, one of them can lock the key between the unlock and
> the mode write of the other. The PMIC then ignores that write, and
> regulator_set_mode() returns 0 while the buck stays in its previous
> mode. mt6363_va15_set_voltage_sel() unlocks and locks the same key,
> so it can also lock it during a buck mode change.
> 
> Hold a mutex from each unlock of the key to its relock, in the FAST bit
> writes and in the VA15 voltage setter.
> 
> Fixes: 3c36965df808 ("regulator: Add support for MediaTek MT6363 SPMI PMIC Regulators")
> Signed-off-by: Alexandre Mergnat <amergnat at baylibre.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>




More information about the linux-arm-kernel mailing list