summaryrefslogtreecommitdiff
path: root/include/linux/regulator
diff options
context:
space:
mode:
authorFrieder Schrempf <frieder.schrempf@kontron.de>2021-02-22 14:52:20 +0300
committerMark Brown <broonie@kernel.org>2021-03-10 15:22:26 +0300
commit98b94b6e38ca0c4eeb29949c656f6a315000c23e (patch)
treed776d561b7409f6bfa93c5cc2c164ff6545d14a7 /include/linux/regulator
parentdfe03bca8db4957d4b60614ff7df4d136ba90f37 (diff)
downloadlinux-98b94b6e38ca0c4eeb29949c656f6a315000c23e.tar.xz
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. Fixes: 0935ff5f1f0a ("regulator: pca9450: add pca9450 pmic driver") Cc: <stable@vger.kernel.org> Signed-off-by: Frieder Schrempf <frieder.schrempf@kontron.de> Link: https://lore.kernel.org/r/20210222115229.166620-1-frieder.schrempf@kontron.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator')
-rw-r--r--include/linux/regulator/pca9450.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/regulator/pca9450.h b/include/linux/regulator/pca9450.h
index ccdb5320a240..71902f41c919 100644
--- a/include/linux/regulator/pca9450.h
+++ b/include/linux/regulator/pca9450.h
@@ -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