]> www.infradead.org Git - users/jedix/linux-maple.git/commit
regulator: pickable ranges: don't always cache vsel
authorMatti Vaittinen <mazziesaccount@gmail.com>
Mon, 20 May 2024 12:31:33 +0000 (15:31 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 20 May 2024 17:40:39 +0000 (18:40 +0100)
commitf4f4276f985a5aac7b310a4ed040b47e275e7591
treedce1211af8f05901c19af025c1099d77f98138f3
parentcb3a0f84ae0caa5eabf40457485473edc1e2d3f0
regulator: pickable ranges: don't always cache vsel

Some PMICs treat the vsel_reg same as apply-bit. Eg, when voltage range
is changed, the new voltage setting is not taking effect until the vsel
register is written.

Add a flag 'range_applied_by_vsel' to the regulator desc to indicate this
behaviour and to force the vsel value to be written to hardware if range
was changed, even if the old selector was same as the new one.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Link: https://msgid.link/r/ZktCpcGZdgHWuN_L@fedora
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/helpers.c
include/linux/regulator/driver.h