linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support
@ 2025-06-13 11:45 Michael Walle
  2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
                   ` (9 more replies)
  0 siblings, 10 replies; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

Add support for the TI TPS652G1 PMIC which is a stripped down
version of the TPS65224. Support for the latter has already been
merged. Refactor the regulator driver to ease adding new devices.
After doing that adding the TPS652G1 variant is really straight
forward. Some care has to be taken by the interrupt handling (of the
regulator part) because there interrupts are used for voltage
monitoring which this variant doesn't have.

Michael Walle (7):
  mfd: tps6594: Add TI TPS652G1 support
  misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
  pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
  regulator: tps6594-regulator: remove interrupt_count
  regulator: tps6594-regulator: remove hardcoded buck config
  regulator: tps6594-regulator: refactor variant descriptions
  regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators

 drivers/mfd/tps6594-core.c            |  88 ++++++++++-
 drivers/mfd/tps6594-i2c.c             |  10 +-
 drivers/mfd/tps6594-spi.c             |  10 +-
 drivers/misc/tps6594-pfsm.c           |  31 ++--
 drivers/pinctrl/pinctrl-tps6594.c     |  35 ++++
 drivers/regulator/tps6594-regulator.c | 219 +++++++++++++++-----------
 include/linux/mfd/tps6594.h           |   1 +
 7 files changed, 284 insertions(+), 110 deletions(-)

-- 
2.39.5


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

* [PATCH v2 1/7] mfd: tps6594: Add TI TPS652G1 support
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-19 13:35   ` Lee Jones
  2025-07-10  9:00   ` Lee Jones
  2025-06-13 11:45 ` [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM Michael Walle
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

The TPS652G1 is a stripped down version of the TPS65224. From a software
point of view, it lacks any voltage monitoring, the watchdog, the ESM
and the ADC.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/mfd/tps6594-core.c  | 88 ++++++++++++++++++++++++++++++++++---
 drivers/mfd/tps6594-i2c.c   | 10 ++++-
 drivers/mfd/tps6594-spi.c   | 10 ++++-
 include/linux/mfd/tps6594.h |  1 +
 4 files changed, 99 insertions(+), 10 deletions(-)

diff --git a/drivers/mfd/tps6594-core.c b/drivers/mfd/tps6594-core.c
index a7223e873cd1..c16c37e36617 100644
--- a/drivers/mfd/tps6594-core.c
+++ b/drivers/mfd/tps6594-core.c
@@ -1,6 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * Core functions for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
+ * Core functions for following TI PMICs:
+ *  - LP8764
+ *  - TPS65224
+ *  - TPS652G1
+ *  - TPS6593
+ *  - TPS6594
  *
  * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
  */
@@ -414,6 +419,61 @@ static const unsigned int tps65224_irq_reg[] = {
 	TPS6594_REG_INT_FSM_ERR,
 };
 
+/* TPS652G1 Resources */
+
+static const struct mfd_cell tps652g1_common_cells[] = {
+	MFD_CELL_RES("tps6594-pfsm", tps65224_pfsm_resources),
+	MFD_CELL_RES("tps6594-pinctrl", tps65224_pinctrl_resources),
+	MFD_CELL_NAME("tps6594-regulator"),
+};
+
+static const struct regmap_irq tps652g1_irqs[] = {
+	/* INT_GPIO register */
+	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO1, 2, TPS65224_BIT_GPIO1_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO2, 2, TPS65224_BIT_GPIO2_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO3, 2, TPS65224_BIT_GPIO3_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO4, 2, TPS65224_BIT_GPIO4_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO5, 2, TPS65224_BIT_GPIO5_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO6, 2, TPS65224_BIT_GPIO6_INT),
+
+	/* INT_STARTUP register */
+	REGMAP_IRQ_REG(TPS65224_IRQ_VSENSE, 3, TPS65224_BIT_VSENSE_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_ENABLE, 3, TPS6594_BIT_ENABLE_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_PB_SHORT, 3, TPS65224_BIT_PB_SHORT_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_FSD, 3, TPS6594_BIT_FSD_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_SOFT_REBOOT, 3, TPS6594_BIT_SOFT_REBOOT_INT),
+
+	/* INT_MISC register */
+	REGMAP_IRQ_REG(TPS65224_IRQ_BIST_PASS, 4, TPS6594_BIT_BIST_PASS_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_EXT_CLK, 4, TPS6594_BIT_EXT_CLK_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_REG_UNLOCK, 4, TPS65224_BIT_REG_UNLOCK_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_TWARN, 4, TPS6594_BIT_TWARN_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_PB_LONG, 4, TPS65224_BIT_PB_LONG_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_PB_FALL, 4, TPS65224_BIT_PB_FALL_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_PB_RISE, 4, TPS65224_BIT_PB_RISE_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_ADC_CONV_READY, 4, TPS65224_BIT_ADC_CONV_READY_INT),
+
+	/* INT_MODERATE_ERR register */
+	REGMAP_IRQ_REG(TPS65224_IRQ_TSD_ORD, 5, TPS6594_BIT_TSD_ORD_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_BIST_FAIL, 5, TPS6594_BIT_BIST_FAIL_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_REG_CRC_ERR, 5, TPS6594_BIT_REG_CRC_ERR_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_RECOV_CNT, 5, TPS6594_BIT_RECOV_CNT_INT),
+
+	/* INT_SEVERE_ERR register */
+	REGMAP_IRQ_REG(TPS65224_IRQ_TSD_IMM, 6, TPS6594_BIT_TSD_IMM_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_VCCA_OVP, 6, TPS6594_BIT_VCCA_OVP_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_PFSM_ERR, 6, TPS6594_BIT_PFSM_ERR_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_BG_XMON, 6, TPS65224_BIT_BG_XMON_INT),
+
+	/* INT_FSM_ERR register */
+	REGMAP_IRQ_REG(TPS65224_IRQ_IMM_SHUTDOWN, 7, TPS6594_BIT_IMM_SHUTDOWN_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_ORD_SHUTDOWN, 7, TPS6594_BIT_ORD_SHUTDOWN_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_MCU_PWR_ERR, 7, TPS6594_BIT_MCU_PWR_ERR_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_SOC_PWR_ERR, 7, TPS6594_BIT_SOC_PWR_ERR_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_COMM_ERR, 7, TPS6594_BIT_COMM_ERR_INT),
+	REGMAP_IRQ_REG(TPS65224_IRQ_I2C2_ERR, 7, TPS65224_BIT_I2C2_ERR_INT),
+};
+
 static inline unsigned int tps6594_get_irq_reg(struct regmap_irq_chip_data *data,
 					       unsigned int base, int index)
 {
@@ -443,7 +503,7 @@ static int tps6594_handle_post_irq(void *irq_drv_data)
 	 * a new interrupt.
 	 */
 	if (tps->use_crc) {
-		if (tps->chip_id == TPS65224) {
+		if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1) {
 			regmap_reg = TPS6594_REG_INT_FSM_ERR;
 			mask_val = TPS6594_BIT_COMM_ERR_INT;
 		} else {
@@ -481,6 +541,18 @@ static struct regmap_irq_chip tps65224_irq_chip = {
 	.handle_post_irq = tps6594_handle_post_irq,
 };
 
+static struct regmap_irq_chip tps652g1_irq_chip = {
+	.ack_base = TPS6594_REG_INT_BUCK,
+	.ack_invert = 1,
+	.clear_ack = 1,
+	.init_ack_masked = 1,
+	.num_regs = ARRAY_SIZE(tps65224_irq_reg),
+	.irqs = tps652g1_irqs,
+	.num_irqs = ARRAY_SIZE(tps652g1_irqs),
+	.get_irq_reg = tps65224_get_irq_reg,
+	.handle_post_irq = tps6594_handle_post_irq,
+};
+
 static const struct regmap_range tps6594_volatile_ranges[] = {
 	regmap_reg_range(TPS6594_REG_INT_TOP, TPS6594_REG_STAT_READBACK_ERR),
 	regmap_reg_range(TPS6594_REG_RTC_STATUS, TPS6594_REG_RTC_STATUS),
@@ -507,7 +579,7 @@ static int tps6594_check_crc_mode(struct tps6594 *tps, bool primary_pmic)
 	int ret;
 	unsigned int regmap_reg, mask_val;
 
-	if (tps->chip_id == TPS65224) {
+	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1) {
 		regmap_reg = TPS6594_REG_CONFIG_2;
 		mask_val = TPS65224_BIT_I2C1_SPI_CRC_EN;
 	} else {
@@ -537,7 +609,7 @@ static int tps6594_set_crc_feature(struct tps6594 *tps)
 	int ret;
 	unsigned int regmap_reg, mask_val;
 
-	if (tps->chip_id == TPS65224) {
+	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1) {
 		regmap_reg = TPS6594_REG_CONFIG_2;
 		mask_val = TPS65224_BIT_I2C1_SPI_CRC_EN;
 	} else {
@@ -628,6 +700,10 @@ int tps6594_device_init(struct tps6594 *tps, bool enable_crc)
 		irq_chip = &tps65224_irq_chip;
 		n_cells = ARRAY_SIZE(tps65224_common_cells);
 		cells = tps65224_common_cells;
+	} else if (tps->chip_id == TPS652G1) {
+		irq_chip = &tps652g1_irq_chip;
+		n_cells = ARRAY_SIZE(tps652g1_common_cells);
+		cells = tps652g1_common_cells;
 	} else {
 		irq_chip = &tps6594_irq_chip;
 		n_cells = ARRAY_SIZE(tps6594_common_cells);
@@ -651,8 +727,8 @@ int tps6594_device_init(struct tps6594 *tps, bool enable_crc)
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to add common child devices\n");
 
-	/* No RTC for LP8764 and TPS65224 */
-	if (tps->chip_id != LP8764 && tps->chip_id != TPS65224) {
+	/* No RTC for LP8764, TPS65224 and TPS652G1 */
+	if (tps->chip_id != LP8764 && tps->chip_id != TPS65224 && tps->chip_id != TPS652G1) {
 		ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, tps6594_rtc_cells,
 					   ARRAY_SIZE(tps6594_rtc_cells), NULL, 0,
 					   regmap_irq_get_domain(tps->irq_data));
diff --git a/drivers/mfd/tps6594-i2c.c b/drivers/mfd/tps6594-i2c.c
index 4ab91c34d9fb..7ff7516286fd 100644
--- a/drivers/mfd/tps6594-i2c.c
+++ b/drivers/mfd/tps6594-i2c.c
@@ -1,6 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * I2C access driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
+ * I2C access driver for the following TI PMICs:
+ *  - LP8764
+ *  - TPS65224
+ *  - TPS652G1
+ *  - TPS6593
+ *  - TPS6594
  *
  * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
  */
@@ -197,6 +202,7 @@ static const struct of_device_id tps6594_i2c_of_match_table[] = {
 	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
 	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
 	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
+	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
 	{}
 };
 MODULE_DEVICE_TABLE(of, tps6594_i2c_of_match_table);
@@ -222,7 +228,7 @@ static int tps6594_i2c_probe(struct i2c_client *client)
 		return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n");
 	tps->chip_id = (unsigned long)match->data;
 
-	if (tps->chip_id == TPS65224)
+	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1)
 		tps6594_i2c_regmap_config.volatile_table = &tps65224_volatile_table;
 
 	tps->regmap = devm_regmap_init(dev, NULL, client, &tps6594_i2c_regmap_config);
diff --git a/drivers/mfd/tps6594-spi.c b/drivers/mfd/tps6594-spi.c
index 6ebccb79f0cc..944b7313a1d9 100644
--- a/drivers/mfd/tps6594-spi.c
+++ b/drivers/mfd/tps6594-spi.c
@@ -1,6 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * SPI access driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
+ * SPI access driver for the following TI PMICs:
+ *  - LP8764
+ *  - TPS65224
+ *  - TPS652G1
+ *  - TPS6593
+ *  - TPS6594
  *
  * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
  */
@@ -82,6 +87,7 @@ static const struct of_device_id tps6594_spi_of_match_table[] = {
 	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
 	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
 	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
+	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
 	{}
 };
 MODULE_DEVICE_TABLE(of, tps6594_spi_of_match_table);
@@ -107,7 +113,7 @@ static int tps6594_spi_probe(struct spi_device *spi)
 		return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n");
 	tps->chip_id = (unsigned long)match->data;
 
-	if (tps->chip_id == TPS65224)
+	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1)
 		tps6594_spi_regmap_config.volatile_table = &tps65224_volatile_table;
 
 	tps->regmap = devm_regmap_init(dev, NULL, spi, &tps6594_spi_regmap_config);
diff --git a/include/linux/mfd/tps6594.h b/include/linux/mfd/tps6594.h
index 16543fd4d83e..021db8875963 100644
--- a/include/linux/mfd/tps6594.h
+++ b/include/linux/mfd/tps6594.h
@@ -19,6 +19,7 @@ enum pmic_id {
 	TPS6593,
 	LP8764,
 	TPS65224,
+	TPS652G1,
 };
 
 /* Macro to get page index from register address */
-- 
2.39.5


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

* [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
  2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-30  7:48   ` Arnd Bergmann
  2025-06-13 11:45 ` [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO Michael Walle
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

The TPS652G1 is a stripped down TPS65224, but the PFSM is the same.
Thus, handle it the same way as the TPS65224 in the driver.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/misc/tps6594-pfsm.c | 31 +++++++++++++++++++++----------
 1 file changed, 21 insertions(+), 10 deletions(-)

diff --git a/drivers/misc/tps6594-pfsm.c b/drivers/misc/tps6594-pfsm.c
index 6db1c9d48f8f..44fa81d6cec2 100644
--- a/drivers/misc/tps6594-pfsm.c
+++ b/drivers/misc/tps6594-pfsm.c
@@ -1,6 +1,12 @@
 // SPDX-License-Identifier: GPL-2.0
 /*
- * PFSM (Pre-configurable Finite State Machine) driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
+ * PFSM (Pre-configurable Finite State Machine) driver for the following
+ * PMICs:
+ * - LP8764
+ * - TPS65224
+ * - TPS652G1
+ * - TPS6594
+ * - TPS6593
  *
  * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
  */
@@ -141,7 +147,7 @@ static long tps6594_pfsm_ioctl(struct file *f, unsigned int cmd, unsigned long a
 	switch (cmd) {
 	case PMIC_GOTO_STANDBY:
 		/* Disable LP mode on TPS6594 Family PMIC */
-		if (pfsm->chip_id != TPS65224) {
+		if (pfsm->chip_id != TPS65224 && pfsm->chip_id != TPS652G1) {
 			ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_RTC_CTRL_2,
 						TPS6594_BIT_LP_STANDBY_SEL);
 
@@ -154,8 +160,8 @@ static long tps6594_pfsm_ioctl(struct file *f, unsigned int cmd, unsigned long a
 					TPS6594_BIT_TRIGGER_I2C(0), TPS6594_BIT_TRIGGER_I2C(0));
 		break;
 	case PMIC_GOTO_LP_STANDBY:
-		/* TPS65224 does not support LP STANDBY */
-		if (pfsm->chip_id == TPS65224)
+		/* TPS65224/TPS652G1 does not support LP STANDBY */
+		if (pfsm->chip_id == TPS65224 || pfsm->chip_id == TPS652G1)
 			return ret;
 
 		/* Enable LP mode */
@@ -179,8 +185,8 @@ static long tps6594_pfsm_ioctl(struct file *f, unsigned int cmd, unsigned long a
 				      TPS6594_BIT_NSLEEP1B | TPS6594_BIT_NSLEEP2B);
 		break;
 	case PMIC_SET_MCU_ONLY_STATE:
-		/* TPS65224 does not support MCU_ONLY_STATE */
-		if (pfsm->chip_id == TPS65224)
+		/* TPS65224/TPS652G1 does not support MCU_ONLY_STATE */
+		if (pfsm->chip_id == TPS65224 || pfsm->chip_id == TPS652G1)
 			return ret;
 
 		if (copy_from_user(&state_opt, argp, sizeof(state_opt)))
@@ -206,7 +212,7 @@ static long tps6594_pfsm_ioctl(struct file *f, unsigned int cmd, unsigned long a
 			return -EFAULT;
 
 		/* Configure wake-up destination */
-		if (pfsm->chip_id == TPS65224) {
+		if (pfsm->chip_id == TPS65224 || pfsm->chip_id == TPS652G1) {
 			regmap_reg = TPS65224_REG_STARTUP_CTRL;
 			mask = TPS65224_MASK_STARTUP_DEST;
 		} else {
@@ -230,9 +236,14 @@ static long tps6594_pfsm_ioctl(struct file *f, unsigned int cmd, unsigned long a
 			return ret;
 
 		/* Modify NSLEEP1-2 bits */
-		ret = regmap_clear_bits(pfsm->regmap, TPS6594_REG_FSM_NSLEEP_TRIGGERS,
-					pfsm->chip_id == TPS65224 ?
-					TPS6594_BIT_NSLEEP1B : TPS6594_BIT_NSLEEP2B);
+		if (pfsm->chip_id == TPS65224 || pfsm->chip_id == TPS652G1)
+			ret = regmap_clear_bits(pfsm->regmap,
+						TPS6594_REG_FSM_NSLEEP_TRIGGERS,
+						TPS6594_BIT_NSLEEP1B);
+		else
+			ret = regmap_clear_bits(pfsm->regmap,
+						TPS6594_REG_FSM_NSLEEP_TRIGGERS,
+						TPS6594_BIT_NSLEEP2B);
 		break;
 	}
 
-- 
2.39.5


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

* [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
  2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
  2025-06-13 11:45 ` [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-18 11:52   ` Linus Walleij
  2025-06-13 11:45 ` [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count Michael Walle
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

The TPS652G1 is a stripped down version of the TPS65224. Compared to the
TPS65224 it lacks some pin mux functions, like the ADC, voltage
monitoring and the second I2C bus.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/pinctrl/pinctrl-tps6594.c | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-tps6594.c b/drivers/pinctrl/pinctrl-tps6594.c
index 54cc810f79d6..6726853110d1 100644
--- a/drivers/pinctrl/pinctrl-tps6594.c
+++ b/drivers/pinctrl/pinctrl-tps6594.c
@@ -226,6 +226,10 @@ static const char *const tps65224_nerr_mcu_func_group_names[] = {
 	"GPIO5",
 };
 
+static const char *const tps652g1_cs_spi_func_group_names[] = {
+	"GPIO1",
+};
+
 struct tps6594_pinctrl_function {
 	struct pinfunction pinfunction;
 	u8 muxval;
@@ -287,6 +291,18 @@ static const struct tps6594_pinctrl_function tps65224_pinctrl_functions[] = {
 	FUNCTION(tps65224, nerr_mcu, TPS65224_PINCTRL_NERR_MCU_FUNCTION),
 };
 
+static const struct tps6594_pinctrl_function tps652g1_pinctrl_functions[] = {
+	FUNCTION(tps65224, gpio, TPS6594_PINCTRL_GPIO_FUNCTION),
+	FUNCTION(tps65224, sda_i2c2_sdo_spi, TPS65224_PINCTRL_SDA_I2C2_SDO_SPI_FUNCTION),
+	FUNCTION(tps65224, nsleep2, TPS65224_PINCTRL_NSLEEP2_FUNCTION),
+	FUNCTION(tps65224, nint, TPS65224_PINCTRL_NINT_FUNCTION),
+	FUNCTION(tps652g1, cs_spi, TPS65224_PINCTRL_SCL_I2C2_CS_SPI_FUNCTION),
+	FUNCTION(tps65224, nsleep1, TPS65224_PINCTRL_NSLEEP1_FUNCTION),
+	FUNCTION(tps65224, pb, TPS65224_PINCTRL_PB_FUNCTION),
+	FUNCTION(tps65224, wkup, TPS65224_PINCTRL_WKUP_FUNCTION),
+	FUNCTION(tps65224, syncclkin, TPS65224_PINCTRL_SYNCCLKIN_FUNCTION),
+};
+
 struct tps6594_pinctrl {
 	struct tps6594 *tps;
 	struct gpio_regmap *gpio_regmap;
@@ -300,6 +316,16 @@ struct tps6594_pinctrl {
 	struct muxval_remap *remap;
 };
 
+static struct tps6594_pinctrl tps652g1_template_pinctrl = {
+	.funcs = tps652g1_pinctrl_functions,
+	.func_cnt = ARRAY_SIZE(tps652g1_pinctrl_functions),
+	.pins = tps65224_pins,
+	.num_pins = ARRAY_SIZE(tps65224_pins),
+	.mux_sel_mask = TPS65224_MASK_GPIO_SEL,
+	.remap = tps65224_muxval_remap,
+	.remap_cnt = ARRAY_SIZE(tps65224_muxval_remap),
+};
+
 static struct tps6594_pinctrl tps65224_template_pinctrl = {
 	.funcs = tps65224_pinctrl_functions,
 	.func_cnt = ARRAY_SIZE(tps65224_pinctrl_functions),
@@ -475,6 +501,15 @@ static int tps6594_pinctrl_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	switch (tps->chip_id) {
+	case TPS652G1:
+		pctrl_desc->pins = tps65224_pins;
+		pctrl_desc->npins = ARRAY_SIZE(tps65224_pins);
+
+		*pinctrl = tps652g1_template_pinctrl;
+
+		config.ngpio = ARRAY_SIZE(tps65224_gpio_func_group_names);
+		config.ngpio_per_reg = TPS65224_NGPIO_PER_REG;
+		break;
 	case TPS65224:
 		pctrl_desc->pins = tps65224_pins;
 		pctrl_desc->npins = ARRAY_SIZE(tps65224_pins);
-- 
2.39.5


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

* [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (2 preceding siblings ...)
  2025-06-13 11:45 ` [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-13 12:06   ` Mark Brown
  2025-06-13 11:45 ` [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config Michael Walle
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

In .probe() interrupt_count and nr_types is essentially the same. It
contains the number of different interrupt per LDO or buck converter.
Drop one. This is a preparation patch to further simplify the handling
of different variants of this PMIC.

This patch is only compile-time tested.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/regulator/tps6594-regulator.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
index 51264c869aa0..26669f3f1033 100644
--- a/drivers/regulator/tps6594-regulator.c
+++ b/drivers/regulator/tps6594-regulator.c
@@ -577,18 +577,15 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 	const struct regulator_desc *multi_regs;
 	const struct tps6594_regulator_irq_type **ldos_irq_types;
 	const struct regulator_desc *ldo_regs;
-	size_t interrupt_count;
 
 	if (tps->chip_id == TPS65224) {
 		bucks_irq_types = tps65224_bucks_irq_types;
-		interrupt_count = ARRAY_SIZE(tps65224_buck1_irq_types);
 		multi_regs = tps65224_multi_regs;
 		ldos_irq_types = tps65224_ldos_irq_types;
 		ldo_regs = tps65224_ldo_regs;
 		multi_phase_cnt = ARRAY_SIZE(tps65224_multi_regs);
 	} else {
 		bucks_irq_types = tps6594_bucks_irq_types;
-		interrupt_count = ARRAY_SIZE(tps6594_buck1_irq_types);
 		multi_regs = tps6594_multi_regs;
 		ldos_irq_types = tps6594_ldos_irq_types;
 		ldo_regs = tps6594_ldo_regs;
@@ -686,29 +683,27 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
 						 bucks_irq_types[buck_idx],
-						 interrupt_count, &irq_idx);
+						 nr_types, &irq_idx);
 		if (error)
 			return error;
 
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
 						 bucks_irq_types[buck_idx + 1],
-						 interrupt_count, &irq_idx);
+						 nr_types, &irq_idx);
 		if (error)
 			return error;
 
 		if (i == MULTI_BUCK123 || i == MULTI_BUCK1234) {
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
 							 tps6594_bucks_irq_types[buck_idx + 2],
-							 interrupt_count,
-							 &irq_idx);
+							 nr_types, &irq_idx);
 			if (error)
 				return error;
 		}
 		if (i == MULTI_BUCK1234) {
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
 							 tps6594_bucks_irq_types[buck_idx + 3],
-							 interrupt_count,
-							 &irq_idx);
+							 nr_types, &irq_idx);
 			if (error)
 				return error;
 		}
@@ -727,7 +722,7 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 					     "failed to register %s regulator\n", pdev->name);
 
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-						 bucks_irq_types[i], interrupt_count, &irq_idx);
+						 bucks_irq_types[i], nr_types, &irq_idx);
 		if (error)
 			return error;
 	}
@@ -742,7 +737,7 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 						     pdev->name);
 
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-							 ldos_irq_types[i], interrupt_count,
+							 ldos_irq_types[i], nr_types,
 							 &irq_idx);
 			if (error)
 				return error;
-- 
2.39.5


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

* [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (3 preceding siblings ...)
  2025-06-13 11:45 ` [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-13 12:06   ` Mark Brown
  2025-06-13 11:45 ` [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions Michael Walle
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

Commit 00c826525fba ("regulator: tps6594-regulator: Add TI TPS65224 PMIC
regulators") added support for the TPS65224 and made the description of
the multi-phase buck converter variable depending on the variant of the
PMIC. But this was just done for MUTLI_BUCK12 and MULTI_BUCK12_34
configs probably because this variant only supports a multi-phase
configuration on buck 1 and 2. Remove the hardcoded value for the
remaining two configs, too as future PMIC variants might also support
these.

This is a preparation patch to refactor the regulator description and
is compile-time only tested.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/regulator/tps6594-regulator.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
index 26669f3f1033..2c7c4df80695 100644
--- a/drivers/regulator/tps6594-regulator.c
+++ b/drivers/regulator/tps6594-regulator.c
@@ -695,14 +695,14 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 
 		if (i == MULTI_BUCK123 || i == MULTI_BUCK1234) {
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-							 tps6594_bucks_irq_types[buck_idx + 2],
+							 bucks_irq_types[buck_idx + 2],
 							 nr_types, &irq_idx);
 			if (error)
 				return error;
 		}
 		if (i == MULTI_BUCK1234) {
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-							 tps6594_bucks_irq_types[buck_idx + 3],
+							 bucks_irq_types[buck_idx + 3],
 							 nr_types, &irq_idx);
 			if (error)
 				return error;
-- 
2.39.5


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

* [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (4 preceding siblings ...)
  2025-06-13 11:45 ` [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-13 12:07   ` Mark Brown
  2025-06-13 11:45 ` [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators Michael Walle
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

Instead of using conditionals or tri state operators throughout the
.probe() provide a description per variant. This will make it much
easier to add new variants later.

While at it, make the variable naming more consistent.

This patch is only compile-time tested.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/regulator/tps6594-regulator.c | 199 +++++++++++++++-----------
 1 file changed, 112 insertions(+), 87 deletions(-)

diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
index 2c7c4df80695..39adb2db6de8 100644
--- a/drivers/regulator/tps6594-regulator.c
+++ b/drivers/regulator/tps6594-regulator.c
@@ -21,10 +21,6 @@
 #define BUCK_NB			5
 #define LDO_NB			4
 #define MULTI_PHASE_NB		4
-/* TPS6593 and LP8764 supports OV, UV, SC, ILIM */
-#define REGS_INT_NB		4
-/* TPS65224 supports OV or UV */
-#define TPS65224_REGS_INT_NB	1
 
 enum tps6594_regulator_id {
 	/* DCDC's */
@@ -192,7 +188,7 @@ static const struct regulator_ops tps6594_ldos_4_ops = {
 	.map_voltage		= regulator_map_voltage_linear_range,
 };
 
-static const struct regulator_desc buck_regs[] = {
+static const struct regulator_desc tps6594_buck_regs[] = {
 	TPS6594_REGULATOR("BUCK1", "buck1", TPS6594_BUCK_1,
 			  REGULATOR_VOLTAGE, tps6594_bucks_ops, TPS6594_MASK_BUCKS_VSET,
 			  TPS6594_REG_BUCKX_VOUT_1(0),
@@ -549,6 +545,63 @@ static int tps6594_request_reg_irqs(struct platform_device *pdev,
 	return 0;
 }
 
+struct tps6594_regulator_desc {
+	const struct regulator_desc *multi_phase_regs;
+	unsigned int num_multi_phase_regs;
+
+	const struct regulator_desc *buck_regs;
+	int num_buck_regs;
+
+	const struct regulator_desc *ldo_regs;
+	int num_ldo_regs;
+
+	const struct tps6594_regulator_irq_type **bucks_irq_types;
+	const struct tps6594_regulator_irq_type **ldos_irq_types;
+	int num_irq_types;
+
+	const struct tps6594_regulator_irq_type *ext_irq_types;
+	int num_ext_irqs;
+};
+
+static const struct tps6594_regulator_desc tps65224_reg_desc = {
+	.multi_phase_regs = tps65224_multi_regs,
+	.num_multi_phase_regs = ARRAY_SIZE(tps65224_multi_regs),
+	.buck_regs = tps65224_buck_regs,
+	.num_buck_regs = ARRAY_SIZE(tps65224_buck_regs),
+	.ldo_regs = tps65224_ldo_regs,
+	.num_ldo_regs = ARRAY_SIZE(tps65224_ldo_regs),
+	.bucks_irq_types = tps65224_bucks_irq_types,
+	.ldos_irq_types = tps65224_ldos_irq_types,
+	.num_irq_types = 1, /* OV or UV */
+	.ext_irq_types = tps65224_ext_regulator_irq_types,
+	.num_ext_irqs = ARRAY_SIZE(tps65224_ext_regulator_irq_types),
+};
+
+static const struct tps6594_regulator_desc tps6594_reg_desc = {
+	.multi_phase_regs = tps6594_multi_regs,
+	.num_multi_phase_regs = ARRAY_SIZE(tps6594_multi_regs),
+	.buck_regs = tps6594_buck_regs,
+	.num_buck_regs = ARRAY_SIZE(tps6594_buck_regs),
+	.ldo_regs = tps6594_ldo_regs,
+	.num_ldo_regs = ARRAY_SIZE(tps6594_ldo_regs),
+	.bucks_irq_types = tps6594_bucks_irq_types,
+	.ldos_irq_types = tps6594_ldos_irq_types,
+	.num_irq_types = 4, /* OV, UV, SC and ILIM */
+	.ext_irq_types = tps6594_ext_regulator_irq_types,
+	.num_ext_irqs = 2, /* only VCCA OV and UV */
+};
+
+static const struct tps6594_regulator_desc lp8764_reg_desc = {
+	.multi_phase_regs = tps6594_multi_regs,
+	.num_multi_phase_regs = ARRAY_SIZE(tps6594_multi_regs),
+	.buck_regs = tps6594_buck_regs,
+	.num_buck_regs = ARRAY_SIZE(tps6594_buck_regs),
+	.bucks_irq_types = tps6594_bucks_irq_types,
+	.num_irq_types = 4, /* OV, UV, SC and ILIM */
+	.ext_irq_types = tps6594_ext_regulator_irq_types,
+	.num_ext_irqs = ARRAY_SIZE(tps6594_ext_regulator_irq_types),
+};
+
 static int tps6594_regulator_probe(struct platform_device *pdev)
 {
 	struct tps6594 *tps = dev_get_drvdata(pdev->dev.parent);
@@ -559,38 +612,32 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 	struct tps6594_regulator_irq_data *irq_data;
 	struct tps6594_ext_regulator_irq_data *irq_ext_reg_data;
 	const struct tps6594_regulator_irq_type *irq_type;
-	const struct tps6594_regulator_irq_type *irq_types;
 	bool buck_configured[BUCK_NB] = { false };
 	bool buck_multi[MULTI_PHASE_NB] = { false };
+	const struct tps6594_regulator_desc *desc;
+	const struct regulator_desc *multi_regs;
 
 	const char *npname;
 	int error, i, irq, multi;
 	int irq_idx = 0;
 	int buck_idx = 0;
-	int nr_ldo;
-	int nr_buck;
-	int nr_types;
-	unsigned int irq_count;
-	unsigned int multi_phase_cnt;
 	size_t reg_irq_nb;
-	const struct tps6594_regulator_irq_type **bucks_irq_types;
-	const struct regulator_desc *multi_regs;
-	const struct tps6594_regulator_irq_type **ldos_irq_types;
-	const struct regulator_desc *ldo_regs;
 
-	if (tps->chip_id == TPS65224) {
-		bucks_irq_types = tps65224_bucks_irq_types;
-		multi_regs = tps65224_multi_regs;
-		ldos_irq_types = tps65224_ldos_irq_types;
-		ldo_regs = tps65224_ldo_regs;
-		multi_phase_cnt = ARRAY_SIZE(tps65224_multi_regs);
-	} else {
-		bucks_irq_types = tps6594_bucks_irq_types;
-		multi_regs = tps6594_multi_regs;
-		ldos_irq_types = tps6594_ldos_irq_types;
-		ldo_regs = tps6594_ldo_regs;
-		multi_phase_cnt = ARRAY_SIZE(tps6594_multi_regs);
-	}
+	switch (tps->chip_id) {
+	case TPS65224:
+		desc = &tps65224_reg_desc;
+		break;
+	case TPS6594:
+	case TPS6593:
+		desc = &tps6594_reg_desc;
+		break;
+	case LP8764:
+		desc = &lp8764_reg_desc;
+		break;
+	default:
+		dev_err(tps->dev, "unknown chip_id %lu\n", tps->chip_id);
+		return -EINVAL;
+	};
 
 	enum {
 		MULTI_BUCK12,
@@ -611,13 +658,14 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 	 * In case of Multiphase configuration, value should be defined for
 	 * buck_configured to avoid creating bucks for every buck in multiphase
 	 */
-	for (multi = 0; multi < multi_phase_cnt; multi++) {
-		np = of_find_node_by_name(tps->dev->of_node, multi_regs[multi].supply_name);
+	for (multi = 0; multi < desc->num_multi_phase_regs; multi++) {
+		multi_regs = &desc->multi_phase_regs[multi];
+		np = of_find_node_by_name(tps->dev->of_node, multi_regs->supply_name);
 		npname = of_node_full_name(np);
 		np_pmic_parent = of_get_parent(of_get_parent(np));
 		if (of_node_cmp(of_node_full_name(np_pmic_parent), tps->dev->of_node->full_name))
 			continue;
-		if (strcmp(npname, multi_regs[multi].supply_name) == 0) {
+		if (strcmp(npname, multi_regs->supply_name) == 0) {
 			switch (multi) {
 			case MULTI_BUCK12:
 				buck_multi[0] = true;
@@ -650,28 +698,19 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 		}
 	}
 
-	if (tps->chip_id == TPS65224) {
-		nr_buck = ARRAY_SIZE(tps65224_buck_regs);
-		nr_ldo = ARRAY_SIZE(tps65224_ldo_regs);
-		nr_types = TPS65224_REGS_INT_NB;
-	} else {
-		nr_buck = ARRAY_SIZE(buck_regs);
-		nr_ldo = (tps->chip_id == LP8764) ? 0 : ARRAY_SIZE(tps6594_ldo_regs);
-		nr_types = REGS_INT_NB;
-	}
-
-	reg_irq_nb = nr_types * (nr_buck + nr_ldo);
+	reg_irq_nb = desc->num_irq_types * (desc->num_buck_regs + desc->num_ldo_regs);
 
 	irq_data = devm_kmalloc_array(tps->dev, reg_irq_nb,
 				      sizeof(struct tps6594_regulator_irq_data), GFP_KERNEL);
 	if (!irq_data)
 		return -ENOMEM;
 
-	for (i = 0; i < multi_phase_cnt; i++) {
+	for (i = 0; i < desc->num_multi_phase_regs; i++) {
 		if (!buck_multi[i])
 			continue;
 
-		rdev = devm_regulator_register(&pdev->dev, &multi_regs[i], &config);
+		rdev = devm_regulator_register(&pdev->dev, &desc->multi_phase_regs[i],
+					       &config);
 		if (IS_ERR(rdev))
 			return dev_err_probe(tps->dev, PTR_ERR(rdev),
 					     "failed to register %s regulator\n",
@@ -682,89 +721,74 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 			buck_idx = 2;
 
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-						 bucks_irq_types[buck_idx],
-						 nr_types, &irq_idx);
+						 desc->bucks_irq_types[buck_idx],
+						 desc->num_irq_types, &irq_idx);
 		if (error)
 			return error;
 
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-						 bucks_irq_types[buck_idx + 1],
-						 nr_types, &irq_idx);
+						 desc->bucks_irq_types[buck_idx + 1],
+						 desc->num_irq_types, &irq_idx);
 		if (error)
 			return error;
 
 		if (i == MULTI_BUCK123 || i == MULTI_BUCK1234) {
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-							 bucks_irq_types[buck_idx + 2],
-							 nr_types, &irq_idx);
+							 desc->bucks_irq_types[buck_idx + 2],
+							 desc->num_irq_types,
+							 &irq_idx);
 			if (error)
 				return error;
 		}
 		if (i == MULTI_BUCK1234) {
 			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-							 bucks_irq_types[buck_idx + 3],
-							 nr_types, &irq_idx);
+							 desc->bucks_irq_types[buck_idx + 3],
+							 desc->num_irq_types,
+							 &irq_idx);
 			if (error)
 				return error;
 		}
 	}
 
-	for (i = 0; i < nr_buck; i++) {
+	for (i = 0; i < desc->num_buck_regs; i++) {
 		if (buck_configured[i])
 			continue;
 
-		const struct regulator_desc *buck_cfg = (tps->chip_id == TPS65224) ?
-							 tps65224_buck_regs : buck_regs;
-
-		rdev = devm_regulator_register(&pdev->dev, &buck_cfg[i], &config);
+		rdev = devm_regulator_register(&pdev->dev, &desc->buck_regs[i], &config);
 		if (IS_ERR(rdev))
 			return dev_err_probe(tps->dev, PTR_ERR(rdev),
 					     "failed to register %s regulator\n", pdev->name);
 
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-						 bucks_irq_types[i], nr_types, &irq_idx);
+						 desc->bucks_irq_types[i],
+						 desc->num_irq_types, &irq_idx);
 		if (error)
 			return error;
 	}
 
-	/* LP8764 doesn't have LDO */
-	if (tps->chip_id != LP8764) {
-		for (i = 0; i < nr_ldo; i++) {
-			rdev = devm_regulator_register(&pdev->dev, &ldo_regs[i], &config);
-			if (IS_ERR(rdev))
-				return dev_err_probe(tps->dev, PTR_ERR(rdev),
-						     "failed to register %s regulator\n",
-						     pdev->name);
-
-			error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
-							 ldos_irq_types[i], nr_types,
-							 &irq_idx);
-			if (error)
-				return error;
-		}
-	}
+	for (i = 0; i < desc->num_ldo_regs; i++) {
+		rdev = devm_regulator_register(&pdev->dev, &desc->ldo_regs[i], &config);
+		if (IS_ERR(rdev))
+			return dev_err_probe(tps->dev, PTR_ERR(rdev),
+					     "failed to register %s regulator\n",
+					     pdev->name);
 
-	if (tps->chip_id == TPS65224) {
-		irq_types = tps65224_ext_regulator_irq_types;
-		irq_count = ARRAY_SIZE(tps65224_ext_regulator_irq_types);
-	} else {
-		irq_types = tps6594_ext_regulator_irq_types;
-		if (tps->chip_id == LP8764)
-			irq_count = ARRAY_SIZE(tps6594_ext_regulator_irq_types);
-		else
-			/* TPS6593 supports only VCCA OV and UV */
-			irq_count = 2;
+		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
+						 desc->ldos_irq_types[i],
+						 desc->num_irq_types, &irq_idx);
+		if (error)
+			return error;
 	}
 
 	irq_ext_reg_data = devm_kmalloc_array(tps->dev,
-					      irq_count,
+					      desc->num_ext_irqs,
 					      sizeof(struct tps6594_ext_regulator_irq_data),
 					      GFP_KERNEL);
 	if (!irq_ext_reg_data)
 		return -ENOMEM;
 
-	for (i = 0; i < irq_count; ++i) {
-		irq_type = &irq_types[i];
+	for (i = 0; i < desc->num_ext_irqs; ++i) {
+		irq_type = &desc->ext_irq_types[i];
 		irq = platform_get_irq_byname(pdev, irq_type->irq_name);
 		if (irq < 0)
 			return -EINVAL;
@@ -782,6 +806,7 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 					     "failed to request %s IRQ %d\n",
 					     irq_type->irq_name, irq);
 	}
+
 	return 0;
 }
 
-- 
2.39.5


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

* [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (5 preceding siblings ...)
  2025-06-13 11:45 ` [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions Michael Walle
@ 2025-06-13 11:45 ` Michael Walle
  2025-06-13 12:07   ` Mark Brown
  2025-07-02 15:30 ` [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Lee Jones
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-06-13 11:45 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, linux-gpio, Michael Walle

The TI TPS652G1 is a stripped down version of the TPS65224 PMIC. It
doesn't feature the multiphase buck converter nor any voltage
monitoring. Due to the latter there are no interrupts serviced. In case
of the TPS652G1 any interrupt related setup is just skipped.

Signed-off-by: Michael Walle <mwalle@kernel.org>
---
 drivers/regulator/tps6594-regulator.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c
index 39adb2db6de8..ab882daec7c5 100644
--- a/drivers/regulator/tps6594-regulator.c
+++ b/drivers/regulator/tps6594-regulator.c
@@ -577,6 +577,13 @@ static const struct tps6594_regulator_desc tps65224_reg_desc = {
 	.num_ext_irqs = ARRAY_SIZE(tps65224_ext_regulator_irq_types),
 };
 
+static const struct tps6594_regulator_desc tps652g1_reg_desc = {
+	.ldo_regs = tps65224_ldo_regs,
+	.num_ldo_regs = ARRAY_SIZE(tps65224_ldo_regs),
+	.buck_regs = tps65224_buck_regs,
+	.num_buck_regs = ARRAY_SIZE(tps65224_buck_regs),
+};
+
 static const struct tps6594_regulator_desc tps6594_reg_desc = {
 	.multi_phase_regs = tps6594_multi_regs,
 	.num_multi_phase_regs = ARRAY_SIZE(tps6594_multi_regs),
@@ -627,6 +634,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 	case TPS65224:
 		desc = &tps65224_reg_desc;
 		break;
+	case TPS652G1:
+		desc = &tps652g1_reg_desc;
+		break;
 	case TPS6594:
 	case TPS6593:
 		desc = &tps6594_reg_desc;
@@ -716,6 +726,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 					     "failed to register %s regulator\n",
 					     pdev->name);
 
+		if (!desc->num_irq_types)
+			continue;
+
 		/* config multiphase buck12+buck34 */
 		if (i == MULTI_BUCK12_34)
 			buck_idx = 2;
@@ -759,6 +772,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 			return dev_err_probe(tps->dev, PTR_ERR(rdev),
 					     "failed to register %s regulator\n", pdev->name);
 
+		if (!desc->num_irq_types)
+			continue;
+
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
 						 desc->bucks_irq_types[i],
 						 desc->num_irq_types, &irq_idx);
@@ -773,6 +789,9 @@ static int tps6594_regulator_probe(struct platform_device *pdev)
 					     "failed to register %s regulator\n",
 					     pdev->name);
 
+		if (!desc->num_irq_types)
+			continue;
+
 		error = tps6594_request_reg_irqs(pdev, rdev, irq_data,
 						 desc->ldos_irq_types[i],
 						 desc->num_irq_types, &irq_idx);
-- 
2.39.5


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

* Re: [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count
  2025-06-13 11:45 ` [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count Michael Walle
@ 2025-06-13 12:06   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2025-06-13 12:06 UTC (permalink / raw)
  To: Michael Walle
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

On Fri, Jun 13, 2025 at 01:45:15PM +0200, Michael Walle wrote:
> In .probe() interrupt_count and nr_types is essentially the same. It
> contains the number of different interrupt per LDO or buck converter.
> Drop one. This is a preparation patch to further simplify the handling
> of different variants of this PMIC.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config
  2025-06-13 11:45 ` [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config Michael Walle
@ 2025-06-13 12:06   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2025-06-13 12:06 UTC (permalink / raw)
  To: Michael Walle
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 397 bytes --]

On Fri, Jun 13, 2025 at 01:45:16PM +0200, Michael Walle wrote:
> Commit 00c826525fba ("regulator: tps6594-regulator: Add TI TPS65224 PMIC
> regulators") added support for the TPS65224 and made the description of
> the multi-phase buck converter variable depending on the variant of the
> PMIC. But this was just done for MUTLI_BUCK12 and MULTI_BUCK12_34

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions
  2025-06-13 11:45 ` [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions Michael Walle
@ 2025-06-13 12:07   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2025-06-13 12:07 UTC (permalink / raw)
  To: Michael Walle
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 281 bytes --]

On Fri, Jun 13, 2025 at 01:45:17PM +0200, Michael Walle wrote:
> Instead of using conditionals or tri state operators throughout the
> .probe() provide a description per variant. This will make it much
> easier to add new variants later.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators
  2025-06-13 11:45 ` [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators Michael Walle
@ 2025-06-13 12:07   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2025-06-13 12:07 UTC (permalink / raw)
  To: Michael Walle
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 377 bytes --]

On Fri, Jun 13, 2025 at 01:45:18PM +0200, Michael Walle wrote:
> The TI TPS652G1 is a stripped down version of the TPS65224 PMIC. It
> doesn't feature the multiphase buck converter nor any voltage
> monitoring. Due to the latter there are no interrupts serviced. In case
> of the TPS652G1 any interrupt related setup is just skipped.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
  2025-06-13 11:45 ` [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO Michael Walle
@ 2025-06-18 11:52   ` Linus Walleij
  0 siblings, 0 replies; 29+ messages in thread
From: Linus Walleij @ 2025-06-18 11:52 UTC (permalink / raw)
  To: Michael Walle
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Fri, Jun 13, 2025 at 1:45 PM Michael Walle <mwalle@kernel.org> wrote:

> The TPS652G1 is a stripped down version of the TPS65224. Compared to the
> TPS65224 it lacks some pin mux functions, like the ADC, voltage
> monitoring and the second I2C bus.
>
> Signed-off-by: Michael Walle <mwalle@kernel.org>

I guess the #defines for this to work are in other patches so it all needs
to go in at the same time, so:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH v2 1/7] mfd: tps6594: Add TI TPS652G1 support
  2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
@ 2025-06-19 13:35   ` Lee Jones
  2025-07-10  9:00   ` Lee Jones
  1 sibling, 0 replies; 29+ messages in thread
From: Lee Jones @ 2025-06-19 13:35 UTC (permalink / raw)
  To: Michael Walle
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Fri, 13 Jun 2025, Michael Walle wrote:

> The TPS652G1 is a stripped down version of the TPS65224. From a software
> point of view, it lacks any voltage monitoring, the watchdog, the ESM
> and the ADC.
> 
> Signed-off-by: Michael Walle <mwalle@kernel.org>
> ---
>  drivers/mfd/tps6594-core.c  | 88 ++++++++++++++++++++++++++++++++++---
>  drivers/mfd/tps6594-i2c.c   | 10 ++++-
>  drivers/mfd/tps6594-spi.c   | 10 ++++-
>  include/linux/mfd/tps6594.h |  1 +
>  4 files changed, 99 insertions(+), 10 deletions(-)

Looks good.

Let me know when you get the misc Ack.

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
  2025-06-13 11:45 ` [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM Michael Walle
@ 2025-06-30  7:48   ` Arnd Bergmann
  0 siblings, 0 replies; 29+ messages in thread
From: Arnd Bergmann @ 2025-06-30  7:48 UTC (permalink / raw)
  To: Michael Walle, Lee Jones, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis
  Cc: devicetree, linux-kernel, open list:GPIO SUBSYSTEM

On Fri, Jun 13, 2025, at 13:45, Michael Walle wrote:
> The TPS652G1 is a stripped down TPS65224, but the PFSM is the same.
> Thus, handle it the same way as the TPS65224 in the driver.
>
> Signed-off-by: Michael Walle <mwalle@kernel.org>
> ---

Acked-by: Arnd Bergmann <arnd@arndb.de> # drivers/misc/

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

* Re: [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (6 preceding siblings ...)
  2025-06-13 11:45 ` [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators Michael Walle
@ 2025-07-02 15:30 ` Lee Jones
  2025-07-10  8:58 ` (subset) " Lee Jones
  2025-07-10  9:49 ` [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window Lee Jones
  9 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2025-07-02 15:30 UTC (permalink / raw)
  To: Michael Walle
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Fri, 13 Jun 2025, Michael Walle wrote:

> Add support for the TI TPS652G1 PMIC which is a stripped down
> version of the TPS65224. Support for the latter has already been
> merged. Refactor the regulator driver to ease adding new devices.
> After doing that adding the TPS652G1 variant is really straight
> forward. Some care has to be taken by the interrupt handling (of the
> regulator part) because there interrupts are used for voltage
> monitoring which this variant doesn't have.
> 
> Michael Walle (7):
>   mfd: tps6594: Add TI TPS652G1 support
>   misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
>   pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
>   regulator: tps6594-regulator: remove interrupt_count
>   regulator: tps6594-regulator: remove hardcoded buck config
>   regulator: tps6594-regulator: refactor variant descriptions
>   regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators
> 
>  drivers/mfd/tps6594-core.c            |  88 ++++++++++-
>  drivers/mfd/tps6594-i2c.c             |  10 +-
>  drivers/mfd/tps6594-spi.c             |  10 +-
>  drivers/misc/tps6594-pfsm.c           |  31 ++--
>  drivers/pinctrl/pinctrl-tps6594.c     |  35 ++++
>  drivers/regulator/tps6594-regulator.c | 219 +++++++++++++++-----------
>  include/linux/mfd/tps6594.h           |   1 +
>  7 files changed, 284 insertions(+), 110 deletions(-)

Doesn't apply.

Please rebase onto v6.16-rc1.

-- 
Lee Jones [李琼斯]

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

* Re: (subset) [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (7 preceding siblings ...)
  2025-07-02 15:30 ` [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Lee Jones
@ 2025-07-10  8:58 ` Lee Jones
  2025-07-10  9:49 ` [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window Lee Jones
  9 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2025-07-10  8:58 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Mark Brown, Julien Panis, Michael Walle
  Cc: devicetree, linux-kernel, linux-gpio

On Fri, 13 Jun 2025 13:45:11 +0200, Michael Walle wrote:
> Add support for the TI TPS652G1 PMIC which is a stripped down
> version of the TPS65224. Support for the latter has already been
> merged. Refactor the regulator driver to ease adding new devices.
> After doing that adding the TPS652G1 variant is really straight
> forward. Some care has to be taken by the interrupt handling (of the
> regulator part) because there interrupts are used for voltage
> monitoring which this variant doesn't have.
> 
> [...]

Applied, thanks!

[1/7] mfd: tps6594: Add TI TPS652G1 support
      commit: 626bb0a45584d544d84eab909795ccb355062bcc
[2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
      commit: 9cba6a7ebf65c603b80c0b3c7fa8c7c03f1b704c
[3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
      commit: f6420de1c810e282c34de65c70e6cc6177c12394

--
Lee Jones [李琼斯]


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

* Re: [PATCH v2 1/7] mfd: tps6594: Add TI TPS652G1 support
  2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
  2025-06-19 13:35   ` Lee Jones
@ 2025-07-10  9:00   ` Lee Jones
  2025-07-10  9:06     ` Michael Walle
  1 sibling, 1 reply; 29+ messages in thread
From: Lee Jones @ 2025-07-10  9:00 UTC (permalink / raw)
  To: Michael Walle
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Fri, 13 Jun 2025, Michael Walle wrote:

> The TPS652G1 is a stripped down version of the TPS65224. From a software
> point of view, it lacks any voltage monitoring, the watchdog, the ESM
> and the ADC.
> 
> Signed-off-by: Michael Walle <mwalle@kernel.org>
> ---
>  drivers/mfd/tps6594-core.c  | 88 ++++++++++++++++++++++++++++++++++---
>  drivers/mfd/tps6594-i2c.c   | 10 ++++-
>  drivers/mfd/tps6594-spi.c   | 10 ++++-
>  include/linux/mfd/tps6594.h |  1 +
>  4 files changed, 99 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/mfd/tps6594-core.c b/drivers/mfd/tps6594-core.c
> index a7223e873cd1..c16c37e36617 100644
> --- a/drivers/mfd/tps6594-core.c
> +++ b/drivers/mfd/tps6594-core.c
> @@ -1,6 +1,11 @@
>  // SPDX-License-Identifier: GPL-2.0
>  /*
> - * Core functions for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
> + * Core functions for following TI PMICs:
> + *  - LP8764
> + *  - TPS65224
> + *  - TPS652G1
> + *  - TPS6593
> + *  - TPS6594
>   *
>   * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
>   */
> @@ -414,6 +419,61 @@ static const unsigned int tps65224_irq_reg[] = {
>  	TPS6594_REG_INT_FSM_ERR,
>  };
>  
> +/* TPS652G1 Resources */
> +
> +static const struct mfd_cell tps652g1_common_cells[] = {
> +	MFD_CELL_RES("tps6594-pfsm", tps65224_pfsm_resources),
> +	MFD_CELL_RES("tps6594-pinctrl", tps65224_pinctrl_resources),
> +	MFD_CELL_NAME("tps6594-regulator"),
> +};
> +
> +static const struct regmap_irq tps652g1_irqs[] = {
> +	/* INT_GPIO register */
> +	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO1, 2, TPS65224_BIT_GPIO1_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO2, 2, TPS65224_BIT_GPIO2_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO3, 2, TPS65224_BIT_GPIO3_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO4, 2, TPS65224_BIT_GPIO4_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO5, 2, TPS65224_BIT_GPIO5_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_GPIO6, 2, TPS65224_BIT_GPIO6_INT),
> +
> +	/* INT_STARTUP register */
> +	REGMAP_IRQ_REG(TPS65224_IRQ_VSENSE, 3, TPS65224_BIT_VSENSE_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_ENABLE, 3, TPS6594_BIT_ENABLE_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_PB_SHORT, 3, TPS65224_BIT_PB_SHORT_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_FSD, 3, TPS6594_BIT_FSD_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_SOFT_REBOOT, 3, TPS6594_BIT_SOFT_REBOOT_INT),
> +
> +	/* INT_MISC register */
> +	REGMAP_IRQ_REG(TPS65224_IRQ_BIST_PASS, 4, TPS6594_BIT_BIST_PASS_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_EXT_CLK, 4, TPS6594_BIT_EXT_CLK_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_REG_UNLOCK, 4, TPS65224_BIT_REG_UNLOCK_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_TWARN, 4, TPS6594_BIT_TWARN_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_PB_LONG, 4, TPS65224_BIT_PB_LONG_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_PB_FALL, 4, TPS65224_BIT_PB_FALL_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_PB_RISE, 4, TPS65224_BIT_PB_RISE_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_ADC_CONV_READY, 4, TPS65224_BIT_ADC_CONV_READY_INT),
> +
> +	/* INT_MODERATE_ERR register */
> +	REGMAP_IRQ_REG(TPS65224_IRQ_TSD_ORD, 5, TPS6594_BIT_TSD_ORD_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_BIST_FAIL, 5, TPS6594_BIT_BIST_FAIL_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_REG_CRC_ERR, 5, TPS6594_BIT_REG_CRC_ERR_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_RECOV_CNT, 5, TPS6594_BIT_RECOV_CNT_INT),
> +
> +	/* INT_SEVERE_ERR register */
> +	REGMAP_IRQ_REG(TPS65224_IRQ_TSD_IMM, 6, TPS6594_BIT_TSD_IMM_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_VCCA_OVP, 6, TPS6594_BIT_VCCA_OVP_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_PFSM_ERR, 6, TPS6594_BIT_PFSM_ERR_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_BG_XMON, 6, TPS65224_BIT_BG_XMON_INT),
> +
> +	/* INT_FSM_ERR register */
> +	REGMAP_IRQ_REG(TPS65224_IRQ_IMM_SHUTDOWN, 7, TPS6594_BIT_IMM_SHUTDOWN_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_ORD_SHUTDOWN, 7, TPS6594_BIT_ORD_SHUTDOWN_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_MCU_PWR_ERR, 7, TPS6594_BIT_MCU_PWR_ERR_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_SOC_PWR_ERR, 7, TPS6594_BIT_SOC_PWR_ERR_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_COMM_ERR, 7, TPS6594_BIT_COMM_ERR_INT),
> +	REGMAP_IRQ_REG(TPS65224_IRQ_I2C2_ERR, 7, TPS65224_BIT_I2C2_ERR_INT),
> +};
> +
>  static inline unsigned int tps6594_get_irq_reg(struct regmap_irq_chip_data *data,
>  					       unsigned int base, int index)
>  {
> @@ -443,7 +503,7 @@ static int tps6594_handle_post_irq(void *irq_drv_data)
>  	 * a new interrupt.
>  	 */
>  	if (tps->use_crc) {
> -		if (tps->chip_id == TPS65224) {
> +		if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1) {
>  			regmap_reg = TPS6594_REG_INT_FSM_ERR;
>  			mask_val = TPS6594_BIT_COMM_ERR_INT;
>  		} else {
> @@ -481,6 +541,18 @@ static struct regmap_irq_chip tps65224_irq_chip = {
>  	.handle_post_irq = tps6594_handle_post_irq,
>  };
>  
> +static struct regmap_irq_chip tps652g1_irq_chip = {
> +	.ack_base = TPS6594_REG_INT_BUCK,
> +	.ack_invert = 1,
> +	.clear_ack = 1,
> +	.init_ack_masked = 1,
> +	.num_regs = ARRAY_SIZE(tps65224_irq_reg),
> +	.irqs = tps652g1_irqs,
> +	.num_irqs = ARRAY_SIZE(tps652g1_irqs),
> +	.get_irq_reg = tps65224_get_irq_reg,
> +	.handle_post_irq = tps6594_handle_post_irq,
> +};
> +
>  static const struct regmap_range tps6594_volatile_ranges[] = {
>  	regmap_reg_range(TPS6594_REG_INT_TOP, TPS6594_REG_STAT_READBACK_ERR),
>  	regmap_reg_range(TPS6594_REG_RTC_STATUS, TPS6594_REG_RTC_STATUS),
> @@ -507,7 +579,7 @@ static int tps6594_check_crc_mode(struct tps6594 *tps, bool primary_pmic)
>  	int ret;
>  	unsigned int regmap_reg, mask_val;
>  
> -	if (tps->chip_id == TPS65224) {
> +	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1) {
>  		regmap_reg = TPS6594_REG_CONFIG_2;
>  		mask_val = TPS65224_BIT_I2C1_SPI_CRC_EN;
>  	} else {
> @@ -537,7 +609,7 @@ static int tps6594_set_crc_feature(struct tps6594 *tps)
>  	int ret;
>  	unsigned int regmap_reg, mask_val;
>  
> -	if (tps->chip_id == TPS65224) {
> +	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1) {
>  		regmap_reg = TPS6594_REG_CONFIG_2;
>  		mask_val = TPS65224_BIT_I2C1_SPI_CRC_EN;
>  	} else {
> @@ -628,6 +700,10 @@ int tps6594_device_init(struct tps6594 *tps, bool enable_crc)
>  		irq_chip = &tps65224_irq_chip;
>  		n_cells = ARRAY_SIZE(tps65224_common_cells);
>  		cells = tps65224_common_cells;
> +	} else if (tps->chip_id == TPS652G1) {
> +		irq_chip = &tps652g1_irq_chip;
> +		n_cells = ARRAY_SIZE(tps652g1_common_cells);
> +		cells = tps652g1_common_cells;
>  	} else {
>  		irq_chip = &tps6594_irq_chip;
>  		n_cells = ARRAY_SIZE(tps6594_common_cells);
> @@ -651,8 +727,8 @@ int tps6594_device_init(struct tps6594 *tps, bool enable_crc)
>  	if (ret)
>  		return dev_err_probe(dev, ret, "Failed to add common child devices\n");
>  
> -	/* No RTC for LP8764 and TPS65224 */
> -	if (tps->chip_id != LP8764 && tps->chip_id != TPS65224) {
> +	/* No RTC for LP8764, TPS65224 and TPS652G1 */
> +	if (tps->chip_id != LP8764 && tps->chip_id != TPS65224 && tps->chip_id != TPS652G1) {
>  		ret = devm_mfd_add_devices(dev, PLATFORM_DEVID_AUTO, tps6594_rtc_cells,
>  					   ARRAY_SIZE(tps6594_rtc_cells), NULL, 0,
>  					   regmap_irq_get_domain(tps->irq_data));
> diff --git a/drivers/mfd/tps6594-i2c.c b/drivers/mfd/tps6594-i2c.c
> index 4ab91c34d9fb..7ff7516286fd 100644
> --- a/drivers/mfd/tps6594-i2c.c
> +++ b/drivers/mfd/tps6594-i2c.c
> @@ -1,6 +1,11 @@
>  // SPDX-License-Identifier: GPL-2.0
>  /*
> - * I2C access driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
> + * I2C access driver for the following TI PMICs:
> + *  - LP8764
> + *  - TPS65224
> + *  - TPS652G1
> + *  - TPS6593
> + *  - TPS6594
>   *
>   * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
>   */
> @@ -197,6 +202,7 @@ static const struct of_device_id tps6594_i2c_of_match_table[] = {
>  	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
>  	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
>  	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
> +	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, tps6594_i2c_of_match_table);
> @@ -222,7 +228,7 @@ static int tps6594_i2c_probe(struct i2c_client *client)
>  		return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n");
>  	tps->chip_id = (unsigned long)match->data;
>  
> -	if (tps->chip_id == TPS65224)
> +	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1)
>  		tps6594_i2c_regmap_config.volatile_table = &tps65224_volatile_table;
>  
>  	tps->regmap = devm_regmap_init(dev, NULL, client, &tps6594_i2c_regmap_config);
> diff --git a/drivers/mfd/tps6594-spi.c b/drivers/mfd/tps6594-spi.c
> index 6ebccb79f0cc..944b7313a1d9 100644
> --- a/drivers/mfd/tps6594-spi.c
> +++ b/drivers/mfd/tps6594-spi.c
> @@ -1,6 +1,11 @@
>  // SPDX-License-Identifier: GPL-2.0
>  /*
> - * SPI access driver for TI TPS65224/TPS6594/TPS6593/LP8764 PMICs
> + * SPI access driver for the following TI PMICs:
> + *  - LP8764
> + *  - TPS65224
> + *  - TPS652G1
> + *  - TPS6593
> + *  - TPS6594
>   *
>   * Copyright (C) 2023 BayLibre Incorporated - https://www.baylibre.com/
>   */
> @@ -82,6 +87,7 @@ static const struct of_device_id tps6594_spi_of_match_table[] = {
>  	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
>  	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
>  	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
> +	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },

I get warnings about this being undocumented.

Should it be added to:

  Documentation/devicetree/bindings/mfd/ti,tps6594.yaml

>  	{}
>  };
>  MODULE_DEVICE_TABLE(of, tps6594_spi_of_match_table);
> @@ -107,7 +113,7 @@ static int tps6594_spi_probe(struct spi_device *spi)
>  		return dev_err_probe(dev, -EINVAL, "Failed to find matching chip ID\n");
>  	tps->chip_id = (unsigned long)match->data;
>  
> -	if (tps->chip_id == TPS65224)
> +	if (tps->chip_id == TPS65224 || tps->chip_id == TPS652G1)
>  		tps6594_spi_regmap_config.volatile_table = &tps65224_volatile_table;
>  
>  	tps->regmap = devm_regmap_init(dev, NULL, spi, &tps6594_spi_regmap_config);
> diff --git a/include/linux/mfd/tps6594.h b/include/linux/mfd/tps6594.h
> index 16543fd4d83e..021db8875963 100644
> --- a/include/linux/mfd/tps6594.h
> +++ b/include/linux/mfd/tps6594.h
> @@ -19,6 +19,7 @@ enum pmic_id {
>  	TPS6593,
>  	LP8764,
>  	TPS65224,
> +	TPS652G1,
>  };
>  
>  /* Macro to get page index from register address */
> -- 
> 2.39.5
> 

-- 
Lee Jones [李琼斯]

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

* Re: [PATCH v2 1/7] mfd: tps6594: Add TI TPS652G1 support
  2025-07-10  9:00   ` Lee Jones
@ 2025-07-10  9:06     ` Michael Walle
  2025-07-10  9:47       ` Lee Jones
  0 siblings, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-07-10  9:06 UTC (permalink / raw)
  To: Lee Jones
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

Hi Lee,

>> @@ -82,6 +87,7 @@ static const struct of_device_id 
>> tps6594_spi_of_match_table[] = {
>>  	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
>>  	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
>>  	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
>> +	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
> 
> I get warnings about this being undocumented.
> 
> Should it be added to:
> 
>   Documentation/devicetree/bindings/mfd/ti,tps6594.yaml

I've accidentally forgot the DT patch in v2 of this series. This series 
was
superseeded by v3 which has the DT patch again.

https://lore.kernel.org/all/20250703113153.2447110-1-mwalle@kernel.org/

-michael

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

* Re: [PATCH v2 1/7] mfd: tps6594: Add TI TPS652G1 support
  2025-07-10  9:06     ` Michael Walle
@ 2025-07-10  9:47       ` Lee Jones
  0 siblings, 0 replies; 29+ messages in thread
From: Lee Jones @ 2025-07-10  9:47 UTC (permalink / raw)
  To: Michael Walle
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Thu, 10 Jul 2025, Michael Walle wrote:

> Hi Lee,
> 
> > > @@ -82,6 +87,7 @@ static const struct of_device_id
> > > tps6594_spi_of_match_table[] = {
> > >  	{ .compatible = "ti,tps6593-q1", .data = (void *)TPS6593, },
> > >  	{ .compatible = "ti,lp8764-q1",  .data = (void *)LP8764,  },
> > >  	{ .compatible = "ti,tps65224-q1", .data = (void *)TPS65224, },
> > > +	{ .compatible = "ti,tps652g1", .data = (void *)TPS652G1, },
> > 
> > I get warnings about this being undocumented.
> > 
> > Should it be added to:
> > 
> >   Documentation/devicetree/bindings/mfd/ti,tps6594.yaml
> 
> I've accidentally forgot the DT patch in v2 of this series. This series was
> superseeded by v3 which has the DT patch again.
> 
> https://lore.kernel.org/all/20250703113153.2447110-1-mwalle@kernel.org/

Spotted that now.  Thanks.

-- 
Lee Jones [李琼斯]

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

* [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
                   ` (8 preceding siblings ...)
  2025-07-10  8:58 ` (subset) " Lee Jones
@ 2025-07-10  9:49 ` Lee Jones
  2025-07-10  9:57   ` Mark Brown
  2025-07-11 17:37   ` Linus Walleij
  9 siblings, 2 replies; 29+ messages in thread
From: Lee Jones @ 2025-07-10  9:49 UTC (permalink / raw)
  To: Michael Walle
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

Enjoy!

The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:

  Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-pinctrl-v6.17

for you to fetch changes up to d90171bc2e5f69c038d1807e6f64fba3d1ad6bee:

  dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC (2025-07-10 10:40:21 +0100)

----------------------------------------------------------------
Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window

----------------------------------------------------------------
Michael Walle (4):
      mfd: tps6594: Add TI TPS652G1 support
      misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
      pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
      dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC

 .../devicetree/bindings/mfd/ti,tps6594.yaml        |  1 +
 drivers/mfd/tps6594-core.c                         | 88 ++++++++++++++++++++--
 drivers/mfd/tps6594-i2c.c                          | 10 ++-
 drivers/mfd/tps6594-spi.c                          | 10 ++-
 drivers/misc/tps6594-pfsm.c                        | 31 +++++---
 drivers/pinctrl/pinctrl-tps6594.c                  | 35 +++++++++
 include/linux/mfd/tps6594.h                        |  1 +
 7 files changed, 156 insertions(+), 20 deletions(-)The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:

  Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-pinctrl-v6.17

for you to fetch changes up to d90171bc2e5f69c038d1807e6f64fba3d1ad6bee:

  dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC (2025-07-10 10:40:21 +0100)

----------------------------------------------------------------
Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window

----------------------------------------------------------------
Michael Walle (4):
      mfd: tps6594: Add TI TPS652G1 support
      misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM
      pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO
      dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC

 .../devicetree/bindings/mfd/ti,tps6594.yaml        |  1 +
 drivers/mfd/tps6594-core.c                         | 88 ++++++++++++++++++++--
 drivers/mfd/tps6594-i2c.c                          | 10 ++-
 drivers/mfd/tps6594-spi.c                          | 10 ++-
 drivers/misc/tps6594-pfsm.c                        | 31 +++++---
 drivers/pinctrl/pinctrl-tps6594.c                  | 35 +++++++++
 include/linux/mfd/tps6594.h                        |  1 +
 7 files changed, 156 insertions(+), 20 deletions(-)

-- 
Lee Jones [李琼斯]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-10  9:49 ` [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window Lee Jones
@ 2025-07-10  9:57   ` Mark Brown
  2025-07-10 10:46     ` Michael Walle
  2025-07-18  7:13     ` Lee Jones
  2025-07-11 17:37   ` Linus Walleij
  1 sibling, 2 replies; 29+ messages in thread
From: Mark Brown @ 2025-07-10  9:57 UTC (permalink / raw)
  To: Lee Jones
  Cc: Michael Walle, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

On Thu, Jul 10, 2025 at 10:49:06AM +0100, Lee Jones wrote:
> Enjoy!
> 
> The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:
> 
>   Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)
> 
> are available in the Git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-pinctrl-v6.17
> 
> for you to fetch changes up to d90171bc2e5f69c038d1807e6f64fba3d1ad6bee:
> 
>   dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC (2025-07-10 10:40:21 +0100)
> 
> ----------------------------------------------------------------
> Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window

Is there some reason you didn't also pick up the regulator patches?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-10  9:57   ` Mark Brown
@ 2025-07-10 10:46     ` Michael Walle
  2025-07-10 11:04       ` Mark Brown
  2025-07-18  7:13     ` Lee Jones
  1 sibling, 1 reply; 29+ messages in thread
From: Michael Walle @ 2025-07-10 10:46 UTC (permalink / raw)
  To: Mark Brown, Lee Jones
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Arnd Bergmann,
	Greg Kroah-Hartman, Linus Walleij, Liam Girdwood, Julien Panis,
	devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 1447 bytes --]

Hi,

On Thu Jul 10, 2025 at 11:57 AM CEST, Mark Brown wrote:
> On Thu, Jul 10, 2025 at 10:49:06AM +0100, Lee Jones wrote:
> > Enjoy!
> > 
> > The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:
> > 
> >   Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)
> > 
> > are available in the Git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-pinctrl-v6.17
> > 
> > for you to fetch changes up to d90171bc2e5f69c038d1807e6f64fba3d1ad6bee:
> > 
> >   dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC (2025-07-10 10:40:21 +0100)
> > 
> > ----------------------------------------------------------------
> > Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
>
> Is there some reason you didn't also pick up the regulator patches?

The regulator patches don't apply on the MFD tree because there are
two new patches [1, 2] in the regulator tree. Also my patches rely
on them. Thus, the idea was that Lee will provide an immutable tag,
that you can pull together with the remaining regulator patches.

-michael

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git/commit/drivers/regulator/tps6594-regulator.c?id=9bb3c7df546aac38ea64c736a839ef2c75297631
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git/commit/drivers/regulator/tps6594-regulator.c?id=c266209eaef4fef863363557817f7d6a68314321

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-10 10:46     ` Michael Walle
@ 2025-07-10 11:04       ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2025-07-10 11:04 UTC (permalink / raw)
  To: Michael Walle
  Cc: Lee Jones, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

On Thu, Jul 10, 2025 at 12:46:52PM +0200, Michael Walle wrote:
> On Thu Jul 10, 2025 at 11:57 AM CEST, Mark Brown wrote:

> > Is there some reason you didn't also pick up the regulator patches?

> The regulator patches don't apply on the MFD tree because there are
> two new patches [1, 2] in the regulator tree. Also my patches rely
> on them. Thus, the idea was that Lee will provide an immutable tag,
> that you can pull together with the remaining regulator patches.

OK, if there's a situation like this then please don't send the patches
that can't be applied, that way maintainers for the other trees don't
need to see all the resends for something they can't act on.  Instead
ask for the teg, then send a pull request for the tag as part of the
cover letter for the series with the additional patches.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-10  9:49 ` [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window Lee Jones
  2025-07-10  9:57   ` Mark Brown
@ 2025-07-11 17:37   ` Linus Walleij
  1 sibling, 0 replies; 29+ messages in thread
From: Linus Walleij @ 2025-07-11 17:37 UTC (permalink / raw)
  To: Lee Jones
  Cc: Michael Walle, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Liam Girdwood, Mark Brown,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Thu, Jul 10, 2025 at 11:49 AM Lee Jones <lee@kernel.org> wrote:

> The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:
>
>   Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)
>
> are available in the Git repository at:
>
>   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-pinctrl-v6.17
>
> for you to fetch changes up to d90171bc2e5f69c038d1807e6f64fba3d1ad6bee:
>
>   dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC (2025-07-10 10:40:21 +0100)
>
> ----------------------------------------------------------------
> Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window

Thanks for shepherding another successful MFD driver!

I will optimistically assume that this merges in under the pinctrl
umbrella without any snags, or that I can push any merge conflict
into Torvalds' lap during the merge window, it usually works.

Yours,
Linus Walleij

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-10  9:57   ` Mark Brown
  2025-07-10 10:46     ` Michael Walle
@ 2025-07-18  7:13     ` Lee Jones
  2025-07-18 13:27       ` Mark Brown
  1 sibling, 1 reply; 29+ messages in thread
From: Lee Jones @ 2025-07-18  7:13 UTC (permalink / raw)
  To: Mark Brown
  Cc: Michael Walle, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Thu, 10 Jul 2025, Mark Brown wrote:

> On Thu, Jul 10, 2025 at 10:49:06AM +0100, Lee Jones wrote:
> > Enjoy!
> > 
> > The following changes since commit 19272b37aa4f83ca52bdf9c16d5d81bdd1354494:
> > 
> >   Linux 6.16-rc1 (2025-06-08 13:44:43 -0700)
> > 
> > are available in the Git repository at:
> > 
> >   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git ib-mfd-misc-pinctrl-v6.17
> > 
> > for you to fetch changes up to d90171bc2e5f69c038d1807e6f64fba3d1ad6bee:
> > 
> >   dt-bindings: mfd: ti,tps6594: Add TI TPS652G1 PMIC (2025-07-10 10:40:21 +0100)
> > 
> > ----------------------------------------------------------------
> > Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
> 
> Is there some reason you didn't also pick up the regulator patches?

Is that a joke?  I'm going to assume that you're not serious!

https://lore.kernel.org/all/aCWfre2-n_PSuhxR@finisterre.sirena.org.uk/

  ">   1. Apply this now and merge the dependents next cycle
   >   2. Apply this now and provide an IB
   >   3. Wait for all Acks and apply as a unified set
   >
   > We usually choose 3, hence my assumptions above.

   Well, you choose 3 - I do think it'd be a lot easier to go with option
   2, or with applying the rest to your tree as acks come in.  There seemed
   to still be a reasonable amount of discussion on the MFD bits (eg,
   there's some formatting comments still) so I was expecting this series
   to churn some more and was waiting for a resend."

https://lore.kernel.org/all/601dd4c7-0940-498b-815e-99e570e732d2@sirena.org.uk/

  "So not apply the first two patches and share a branch like you said
   above...  TBH these serieses would probably be a bit more legible if
   the branch were created with just the MFD patches, that'd also mean
   smaller cross merges."

IRC:

  "<b*****e> Probably the easiest thing is a tag with the MFD bits and then I can apply the regulator patches?"

Etc ...

-- 
Lee Jones [李琼斯]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-18  7:13     ` Lee Jones
@ 2025-07-18 13:27       ` Mark Brown
  2025-07-18 13:38         ` Lee Jones
  0 siblings, 1 reply; 29+ messages in thread
From: Mark Brown @ 2025-07-18 13:27 UTC (permalink / raw)
  To: Lee Jones
  Cc: Michael Walle, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

On Fri, Jul 18, 2025 at 08:13:44AM +0100, Lee Jones wrote:
> On Thu, 10 Jul 2025, Mark Brown wrote:
> > On Thu, Jul 10, 2025 at 10:49:06AM +0100, Lee Jones wrote:

> > > Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window

> > Is there some reason you didn't also pick up the regulator patches?

> Is that a joke?  I'm going to assume that you're not serious!

There's two things here.  One is that the discussions you've linked were
from back in April/May which was before the merge window and things only
got applied a day or two before the merge window opened.   Then rather
than resending after the merge window as expected whoever it was
complained about the patches not being applied just did that with no
further context and it didn't occur to me to look at the date and as a
result I missed that, sorry.

The other issue is that due to the constant drip of MFD serieses getting
resends what I'm doing I'm just glancing at the relevant patches and
then not looking further if I've already reviewed them.  I frequently
have no recollection of any individual series, especially if there's
been non-trivial time since I actively looked at it.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-18 13:27       ` Mark Brown
@ 2025-07-18 13:38         ` Lee Jones
  2025-07-18 14:33           ` Mark Brown
  0 siblings, 1 reply; 29+ messages in thread
From: Lee Jones @ 2025-07-18 13:38 UTC (permalink / raw)
  To: Mark Brown
  Cc: Michael Walle, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

On Fri, 18 Jul 2025, Mark Brown wrote:

> On Fri, Jul 18, 2025 at 08:13:44AM +0100, Lee Jones wrote:
> > On Thu, 10 Jul 2025, Mark Brown wrote:
> > > On Thu, Jul 10, 2025 at 10:49:06AM +0100, Lee Jones wrote:
> 
> > > > Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
> 
> > > Is there some reason you didn't also pick up the regulator patches?
> 
> > Is that a joke?  I'm going to assume that you're not serious!
> 
> There's two things here.  One is that the discussions you've linked were
> from back in April/May which was before the merge window and things only
> got applied a day or two before the merge window opened.   Then rather
> than resending after the merge window as expected whoever it was
> complained about the patches not being applied just did that with no
> further context and it didn't occur to me to look at the date and as a
> result I missed that, sorry.
> 
> The other issue is that due to the constant drip of MFD serieses getting
> resends what I'm doing I'm just glancing at the relevant patches and
> then not looking further if I've already reviewed them.  I frequently
> have no recollection of any individual series, especially if there's
> been non-trivial time since I actively looked at it.

This is bigger than these particular series.  There are more examples,
but I stopped at the three most recent ones.

For the past decade or so I've been taking cross-subsystem patch-sets
and submitting pull-requests to all other maintainers, after testing of
course.  However, more recently you have become increasingly vocal in
terms of an alternative approach, whereby I apply the set without
patches that pertain to your AoR (usually Regulators) and submit an
immutable branch for you to pull from.  I have attempted both recently
and each has received criticism, showing preference for the other.

Honestly, I don't mind which strategy we put into place.  Let's just
agree on one and go with it.

-- 
Lee Jones [李琼斯]

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

* Re: [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window
  2025-07-18 13:38         ` Lee Jones
@ 2025-07-18 14:33           ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2025-07-18 14:33 UTC (permalink / raw)
  To: Lee Jones
  Cc: Michael Walle, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Arnd Bergmann, Greg Kroah-Hartman, Linus Walleij, Liam Girdwood,
	Julien Panis, devicetree, linux-kernel, linux-gpio

[-- Attachment #1: Type: text/plain, Size: 1021 bytes --]

On Fri, Jul 18, 2025 at 02:38:46PM +0100, Lee Jones wrote:

> For the past decade or so I've been taking cross-subsystem patch-sets
> and submitting pull-requests to all other maintainers, after testing of
> course.  However, more recently you have become increasingly vocal in
> terms of an alternative approach, whereby I apply the set without
> patches that pertain to your AoR (usually Regulators) and submit an
> immutable branch for you to pull from.  I have attempted both recently
> and each has received criticism, showing preference for the other.

> Honestly, I don't mind which strategy we put into place.  Let's just
> agree on one and go with it.

What I'm expecting is that if I've reviewed/acked something then it'd be
applied but that if the MFD stuff is good to go then that gets applied
as is and any remaining patches get handled separately.

This was a weird case where I'd reviewed the patches without realising
there were dependencies, and those deps weren't an issue whenever
someone sent a ping.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2025-07-18 14:33 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 11:45 [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Michael Walle
2025-06-13 11:45 ` [PATCH v2 1/7] " Michael Walle
2025-06-19 13:35   ` Lee Jones
2025-07-10  9:00   ` Lee Jones
2025-07-10  9:06     ` Michael Walle
2025-07-10  9:47       ` Lee Jones
2025-06-13 11:45 ` [PATCH v2 2/7] misc: tps6594-pfsm: Add TI TPS652G1 PMIC PFSM Michael Walle
2025-06-30  7:48   ` Arnd Bergmann
2025-06-13 11:45 ` [PATCH v2 3/7] pinctrl: pinctrl-tps6594: Add TPS652G1 PMIC pinctrl and GPIO Michael Walle
2025-06-18 11:52   ` Linus Walleij
2025-06-13 11:45 ` [PATCH v2 4/7] regulator: tps6594-regulator: remove interrupt_count Michael Walle
2025-06-13 12:06   ` Mark Brown
2025-06-13 11:45 ` [PATCH v2 5/7] regulator: tps6594-regulator: remove hardcoded buck config Michael Walle
2025-06-13 12:06   ` Mark Brown
2025-06-13 11:45 ` [PATCH v2 6/7] regulator: tps6594-regulator: refactor variant descriptions Michael Walle
2025-06-13 12:07   ` Mark Brown
2025-06-13 11:45 ` [PATCH v2 7/7] regulator: tps6594-regulator: Add TI TPS652G1 PMIC regulators Michael Walle
2025-06-13 12:07   ` Mark Brown
2025-07-02 15:30 ` [PATCH v2 0/7] mfd: tps6594: Add TI TPS652G1 support Lee Jones
2025-07-10  8:58 ` (subset) " Lee Jones
2025-07-10  9:49 ` [GIT PULL] Immutable branch between MFD, Misc and Pinctrl due for the v6.17 merge window Lee Jones
2025-07-10  9:57   ` Mark Brown
2025-07-10 10:46     ` Michael Walle
2025-07-10 11:04       ` Mark Brown
2025-07-18  7:13     ` Lee Jones
2025-07-18 13:27       ` Mark Brown
2025-07-18 13:38         ` Lee Jones
2025-07-18 14:33           ` Mark Brown
2025-07-11 17:37   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).