Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: stpmic1: Fixup main control register and bits naming

Fixup main control register and bits naming so the match the naming from
the datasheet.

https://www.st.com/resource/en/datasheet/stpmic1.pdf

Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230602062426.3947116-1-sean@geanix.com

authored by

Sean Nyekjaer and committed by
Lee Jones
48b4371b 2ce68cf1

+8 -8
+2 -2
drivers/mfd/stpmic1.c
··· 19 19 20 20 static const struct regmap_range stpmic1_readable_ranges[] = { 21 21 regmap_reg_range(TURN_ON_SR, VERSION_SR), 22 - regmap_reg_range(SWOFF_PWRCTRL_CR, LDO6_STDBY_CR), 22 + regmap_reg_range(MAIN_CR, LDO6_STDBY_CR), 23 23 regmap_reg_range(BST_SW_CR, BST_SW_CR), 24 24 regmap_reg_range(INT_PENDING_R1, INT_PENDING_R4), 25 25 regmap_reg_range(INT_CLEAR_R1, INT_CLEAR_R4), ··· 30 30 }; 31 31 32 32 static const struct regmap_range stpmic1_writeable_ranges[] = { 33 - regmap_reg_range(SWOFF_PWRCTRL_CR, LDO6_STDBY_CR), 33 + regmap_reg_range(MAIN_CR, LDO6_STDBY_CR), 34 34 regmap_reg_range(BST_SW_CR, BST_SW_CR), 35 35 regmap_reg_range(INT_CLEAR_R1, INT_CLEAR_R4), 36 36 regmap_reg_range(INT_SET_MASK_R1, INT_SET_MASK_R4),
+6 -6
include/linux/mfd/stpmic1.h
··· 15 15 #define RREQ_STATE_SR 0x5 16 16 #define VERSION_SR 0x6 17 17 18 - #define SWOFF_PWRCTRL_CR 0x10 18 + #define MAIN_CR 0x10 19 19 #define PADS_PULL_CR 0x11 20 20 #define BUCKS_PD_CR 0x12 21 21 #define LDO14_PD_CR 0x13 ··· 148 148 #define LDO_BYPASS_MASK BIT(7) 149 149 150 150 /* Main PMIC Control Register 151 - * SWOFF_PWRCTRL_CR 151 + * MAIN_CR 152 152 * Address : 0x10 153 153 */ 154 - #define ICC_EVENT_ENABLED BIT(4) 154 + #define OCP_OFF_DBG BIT(4) 155 155 #define PWRCTRL_POLARITY_HIGH BIT(3) 156 - #define PWRCTRL_PIN_VALID BIT(2) 157 - #define RESTART_REQUEST_ENABLED BIT(1) 158 - #define SOFTWARE_SWITCH_OFF_ENABLED BIT(0) 156 + #define PWRCTRL_ENABLE BIT(2) 157 + #define RESTART_REQUEST_ENABLE BIT(1) 158 + #define SOFTWARE_SWITCH_OFF BIT(0) 159 159 160 160 /* Main PMIC PADS Control Register 161 161 * PADS_PULL_CR