Patch "regulator: tps6287x: Force writing VSEL bit" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    regulator: tps6287x: Force writing VSEL bit

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     regulator-tps6287x-force-writing-vsel-bit.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b36a1fd62d3d65e57e4122eadf09baf131277bf4
Author: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Date:   Mon May 20 15:36:55 2024 +0300

    regulator: tps6287x: Force writing VSEL bit
    
    [ Upstream commit 1ace99d7c7c4c801c0660246f741ff846a9b8e3c ]
    
    The data-sheet for TPS6287x-Q1
    https://www.ti.com/lit/ds/symlink/tps62873-q1.pdf
    states at chapter 9.3.6.1 Output Voltage Range:
    
    "Note that every change to the VRANGE[1:0] bits must be followed by a
    write to the VSET register, even if the value of the VSET[7:0] bits does
    not change."
    
    The current implementation of the driver uses the
    regulator_set_voltage_sel_pickable_regmap() helper which further uses
    regmap_update_bits() to write the VSET-register. The
    regmap_update_bits() will not access the hardware if the new register
    value is same as old. It is worth noting that this is true also when the
    register is marked volatile, which I can't say is wrong because
    'read-mnodify-write'-cycle with a volatile register is in any case
    something user should carefully consider.
    
    The 'range_applied_by_vsel'-flag in regulator desc was added to force
    the vsel register upodates by using regmap_write_bits(). This variant
    will always unconditionally write the bits to the hardware.
    
    It is worth noting that the vsel is now forced to be written to the
    hardware, whether the range was changed or not. This may cause a
    performance drop if users are wrtiting same voltage value repeteadly.
    
    It would be possible to read the range register to determine if it was
    changed, but this would be a performance issue for users who don't use
    reg cache for vsel.
    
    Always write the VSET register to the hardware regardless the cache.
    
    Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
    Fixes: 7b0518fbf2be ("regulator: Add support for TI TPS6287x regulators")
    Link: https://msgid.link/r/ZktD50C5twF1EuKu@fedora
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/regulator/tps6287x-regulator.c b/drivers/regulator/tps6287x-regulator.c
index 9b7c3d77789e3..3c9d79e003e4b 100644
--- a/drivers/regulator/tps6287x-regulator.c
+++ b/drivers/regulator/tps6287x-regulator.c
@@ -115,6 +115,7 @@ static struct regulator_desc tps6287x_reg = {
 	.vsel_mask = 0xFF,
 	.vsel_range_reg = TPS6287X_CTRL2,
 	.vsel_range_mask = TPS6287X_CTRL2_VRANGE,
+	.range_applied_by_vsel = true,
 	.ramp_reg = TPS6287X_CTRL1,
 	.ramp_mask = TPS6287X_CTRL1_VRAMP,
 	.ramp_delay_table = tps6287x_ramp_table,




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux