FAILED: patch "[PATCH] regulator: pca9450: Clear PRESET_EN bit to fix BUCK1/2/3" failed to apply to 5.10-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 98b94b6e38ca0c4eeb29949c656f6a315000c23e Mon Sep 17 00:00:00 2001
From: Frieder Schrempf <[email protected]>
Date: Mon, 22 Feb 2021 12:52:20 +0100
Subject: [PATCH] regulator: pca9450: Clear PRESET_EN bit to fix BUCK1/2/3
voltage setting
The driver uses the DVS registers PCA9450_REG_BUCKxOUT_DVS0 to set the voltage for the buck regulators 1, 2 and 3. This has no effect as the PRESET_EN bit is set by default and therefore the preset values are used instead, which are set to 850 mV.
To fix this we clear the PRESET_EN bit at time of initialization.
drivers/regulator/pca9450-regulator.c +8 -0
@@ -797,6 +797,14 @@ static int pca9450_i2c_probe(struct i2c_client *i2c,return ret; } +/* Clear PRESET_EN bit in BUCK123_DVS to use DVS registers */ + ret =regmap_clear_bits (pca9450->regmap,PCA9450_REG_BUCK123_DVS , +BUCK123_PRESET_EN ); +if (ret) { +dev_err (&i2c->dev,"Failed to clear PRESET_EN bit: %d\n" , ret); +return ret; + } +/* Set reset behavior on assertion of WDOG_B signal */ ret =regmap_update_bits (pca9450->regmap,PCA9450_REG_RESET_CTRL ,WDOG_B_CFG_MASK ,WDOG_B_CFG_COLD_LDO12 );
include/linux/regulator/pca9450.h +3 -0
@@ -147,6 +147,9 @@ enum {#define BUCK6_FPWM 0x04#define BUCK6_ENMODE_MASK 0x03 +/* PCA9450_REG_BUCK123_PRESET_EN bit */ +#define BUCK123_PRESET_EN 0x80 +/* PCA9450_BUCK1OUT_DVS0 bits */ #define BUCK1OUT_DVS0_MASK 0x7F#define BUCK1OUT_DVS0_DEFAULT 0x14