All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] regulator: pca9450: Use LDO5 low-control enable mask
@ 2026-08-18  1:40 Fabio Estevam
  2026-08-18  1:40 ` [PATCH v2 2/2] regulator: pca9450: Support regulator-off-in-suspend Fabio Estevam
  0 siblings, 1 reply; 2+ messages in thread
From: Fabio Estevam @ 2026-08-18  1:40 UTC (permalink / raw)
  To: broonie; +Cc: linux-kernel, imx, Fabio Estevam

From: Fabio Estevam <festevam@nabladev.com>

LDO5 has voltage-selection fields in both LDO5CTRL_L and LDO5CTRL_H,
selected by the SD_VSEL pin. Its ENMODE field, however, is only in
LDO5CTRL_L.

The regulator descriptors correctly use LDO5CTRL_L as enable_reg, but
use the misleading LDO5H_EN_MASK name for enable_mask. Both mask
definitions have the same value, so this causes no functional problem.

Use LDO5L_EN_MASK in all LDO5 descriptors and remove the unused
LDO5H_EN_MASK definition.

Signed-off-by: Fabio Estevam <festevam@nabladev.com>
---
Changes since v1:
- New patch clarifying that the LDO5 ENMODE field is in LDO5CTRL_L.

 drivers/regulator/pca9450-regulator.c | 6 +++---
 include/linux/regulator/pca9450.h     | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/pca9450-regulator.c b/drivers/regulator/pca9450-regulator.c
index c41db70fa052..93d0af7f7eda 100644
--- a/drivers/regulator/pca9450-regulator.c
+++ b/drivers/regulator/pca9450-regulator.c
@@ -621,7 +621,7 @@ static struct pca9450_regulator_desc pca9450a_regulators[] = {
 			.vsel_reg = PCA9450_REG_LDO5CTRL_H,
 			.vsel_mask = LDO5HOUT_MASK,
 			.enable_reg = PCA9450_REG_LDO5CTRL_L,
-			.enable_mask = LDO5H_EN_MASK,
+			.enable_mask = LDO5L_EN_MASK,
 			.owner = THIS_MODULE,
 		},
 	},
@@ -866,7 +866,7 @@ static struct pca9450_regulator_desc pca9450bc_regulators[] = {
 			.vsel_reg = PCA9450_REG_LDO5CTRL_H,
 			.vsel_mask = LDO5HOUT_MASK,
 			.enable_reg = PCA9450_REG_LDO5CTRL_L,
-			.enable_mask = LDO5H_EN_MASK,
+			.enable_mask = LDO5L_EN_MASK,
 			.owner = THIS_MODULE,
 		},
 	},
@@ -1086,7 +1086,7 @@ static struct pca9450_regulator_desc pca9451a_regulators[] = {
 			.vsel_reg = PCA9450_REG_LDO5CTRL_H,
 			.vsel_mask = LDO5HOUT_MASK,
 			.enable_reg = PCA9450_REG_LDO5CTRL_L,
-			.enable_mask = LDO5H_EN_MASK,
+			.enable_mask = LDO5L_EN_MASK,
 			.owner = THIS_MODULE,
 		},
 	},
diff --git a/include/linux/regulator/pca9450.h b/include/linux/regulator/pca9450.h
index 0df8b3c48082..2aa73624d0b8 100644
--- a/include/linux/regulator/pca9450.h
+++ b/include/linux/regulator/pca9450.h
@@ -210,7 +210,6 @@ enum {
 #define LDO5L_EN_MASK			0xC0
 #define LDO5LOUT_MASK			0x0F
 
-#define LDO5H_EN_MASK			0xC0
 #define LDO5HOUT_MASK			0x0F
 
 /* PCA9450_REG_IRQ bits */
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-18  1:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18  1:40 [PATCH v2 1/2] regulator: pca9450: Use LDO5 low-control enable mask Fabio Estevam
2026-08-18  1:40 ` [PATCH v2 2/2] regulator: pca9450: Support regulator-off-in-suspend Fabio Estevam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.