Skip to contentSkip to conversation

mfd: max77705: support revision 0x2

PATCH In review Eric Gonçalves 2 participants 6 messages Oct 14, 2025 – Nov 6, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mfd: max77705: support revision 0x2

Revision 0x2 has been tested on the r0q (Galaxy S22) board.

---
 drivers/mfd/max77705.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max77705.c +2 -2
index e1a9bfd65856..5201a4c9c3f5 100644
@@ -105,8 +105,8 @@ static int max77705_i2c_probe(struct i2c_client *i2c)
 		return -ENODEV;
 
 	pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
-	if (pmic_rev != MAX77705_PASS3)
-		return dev_err_probe(dev, -ENODEV, "Rev.0x%x is not tested\n", pmic_rev);
+	if (pmic_rev == MAX77705_PASS1)
+		return dev_err_probe(dev, -ENODEV, "Rev.0x1 is not tested\n");
 
 	/* Active Discharge Enable */
 	regmap_update_bits(max77705->regmap, MAX77705_PMIC_REG_MAINCTRL1, 1, 1);
Signature · 1 line
2.51.0
maintainer
#1 lore raw
Quoted 12 lines · Eric Gonçalves

Revision 0x2 has been tested on the r0q (Galaxy S22) board.

---
 drivers/mfd/max77705.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max77705.c +0 -0
index e1a9bfd65856..5201a4c9c3f5 100644

drivers/mfd/max77705.c static int max77705_i2c_probe(struct i2c_client *i2c) · line 109

Quoted 7 lines
drivers/mfd/max77705.c +2 -2
@@ -105,8 +105,8 @@ static int max77705_i2c_probe(struct i2c_client *i2c)
 		return -ENODEV;
 
 	pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
-	if (pmic_rev != MAX77705_PASS3)
-		return dev_err_probe(dev, -ENODEV, "Rev.0x%x is not tested\n", pmic_rev);
+	if (pmic_rev == MAX77705_PASS1)
+		return dev_err_probe(dev, -ENODEV, "Rev.0x1 is not tested\n");

What happens when PASS4 is released but not tested?

What about changing only the first line to:

  if (pmic_rev < MAX77705_PASS2 || pmic_rev > MAX77705_PASS3)
Quoted 5 lines
drivers/mfd/max77705.c +0 -0
 	/* Active Discharge Enable */
 	regmap_update_bits(max77705->regmap, MAX77705_PMIC_REG_MAINCTRL1, 1, 1);
Signature · 1 line
2.51.0
Signature · 1 line
Lee Jones [李琼斯]
author
#2 lore raw
Quoted 17 lines · Lee Jones
Quoted 14 lines · Eric Gonçalves

Revision 0x2 has been tested on the r0q (Galaxy S22) board.

---
 drivers/mfd/max77705.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max77705.c +0 -0
index e1a9bfd65856..5201a4c9c3f5 100644
@@ -105,8 +105,8 @@ static int max77705_i2c_probe(struct i2c_client *i2c)
              return -ENODEV;
 
Quoted 7 lines

drivers/mfd/max77705.c static int max77705_i2c_probe(struct i2c_client *i2c) · line 109

Quoted 5 lines
drivers/mfd/max77705.c +2 -2
      pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
-     if (pmic_rev != MAX77705_PASS3)
-             return dev_err_probe(dev, -ENODEV, "Rev.0x%x is not tested\n", pmic_rev);
+     if (pmic_rev == MAX77705_PASS1)
+             return dev_err_probe(dev, -ENODEV, "Rev.0x1 is not tested\n");

What happens when PASS4 is released but not tested?

PASS4 doesn't exist from what I've seen on the max77705 header files.

Quoted 13 lines

What about changing only the first line to:

  if (pmic_rev < MAX77705_PASS2 || pmic_rev > MAX77705_PASS3)
Quoted 5 lines
drivers/mfd/max77705.c +0 -1
      /* Active Discharge Enable */
      regmap_update_bits(max77705->regmap, MAX77705_PMIC_REG_MAINCTRL1, 1, 1);
--

2.51.0

--
Lee Jones [李琼斯]

maintainer
#3 lore raw
Quoted 18 lines · Ghatto
Quoted 17 lines · Lee Jones
Quoted 14 lines · Eric Gonçalves

Revision 0x2 has been tested on the r0q (Galaxy S22) board.

---
 drivers/mfd/max77705.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max77705.c +0 -0
index e1a9bfd65856..5201a4c9c3f5 100644
@@ -105,8 +105,8 @@ static int max77705_i2c_probe(struct i2c_client *i2c)
              return -ENODEV;
 
Quoted 8 lines
Quoted 7 lines

drivers/mfd/max77705.c static int max77705_i2c_probe(struct i2c_client *i2c) · line 109

Quoted 5 lines
drivers/mfd/max77705.c +2 -2
      pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
-     if (pmic_rev != MAX77705_PASS3)
-             return dev_err_probe(dev, -ENODEV, "Rev.0x%x is not tested\n", pmic_rev);
+     if (pmic_rev == MAX77705_PASS1)
+             return dev_err_probe(dev, -ENODEV, "Rev.0x1 is not tested\n");

What happens when PASS4 is released but not tested?

PASS4 doesn't exist from what I've seen on the max77705 header files.

Not yet.

But not having it in the defined does not mean one won't exist in the future.

Signature · 1 line
Lee Jones [李琼斯]
#4 lore raw
Quoted 27 lines · Lee Jones
Quoted 25 lines · Ghatto
Quoted 24 lines · Lee Jones
Quoted 12 lines · Eric Gonçalves

Revision 0x2 has been tested on the r0q (Galaxy S22) board.

---
 drivers/mfd/max77705.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max77705.c +0 -0
index e1a9bfd65856..5201a4c9c3f5 100644

drivers/mfd/max77705.c static int max77705_i2c_probe(struct i2c_client *i2c) · line 109

Quoted 7 lines
drivers/mfd/max77705.c +2 -2
@@ -105,8 +105,8 @@ static int max77705_i2c_probe(struct i2c_client *i2c)
              return -ENODEV;
 
      pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
-     if (pmic_rev != MAX77705_PASS3)
-             return dev_err_probe(dev, -ENODEV, "Rev.0x%x is not tested\n", pmic_rev);
+     if (pmic_rev == MAX77705_PASS1)
+             return dev_err_probe(dev, -ENODEV, "Rev.0x1 is not tested\n");

What happens when PASS4 is released but not tested?

Quoted 5 lines
Quoted 1 line

PASS4 doesn't exist from what I've seen on the max77705 header files.

Not yet.

But not having it in the defined does not mean one won't exist in the future.

I don't think it will, newer Samsungs already use a new maxim controller.

Quoted 1 line
maintainer
#5 lore raw
Quoted 30 lines · Eric Gonçalves
Quoted 27 lines · Lee Jones
Quoted 25 lines · Ghatto
Quoted 24 lines · Lee Jones
Quoted 12 lines · Eric Gonçalves

Revision 0x2 has been tested on the r0q (Galaxy S22) board.

---
 drivers/mfd/max77705.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/mfd/max77705.c +0 -0
index e1a9bfd65856..5201a4c9c3f5 100644

drivers/mfd/max77705.c static int max77705_i2c_probe(struct i2c_client *i2c) · line 109

Quoted 7 lines
drivers/mfd/max77705.c +2 -2
@@ -105,8 +105,8 @@ static int max77705_i2c_probe(struct i2c_client *i2c)
              return -ENODEV;
 
      pmic_rev = pmic_rev_value & MAX77705_REVISION_MASK;
-     if (pmic_rev != MAX77705_PASS3)
-             return dev_err_probe(dev, -ENODEV, "Rev.0x%x is not tested\n", pmic_rev);
+     if (pmic_rev == MAX77705_PASS1)
+             return dev_err_probe(dev, -ENODEV, "Rev.0x1 is not tested\n");

What happens when PASS4 is released but not tested?

Quoted 6 lines
Quoted 5 lines
Quoted 1 line

PASS4 doesn't exist from what I've seen on the max77705 header files.

Not yet.

But not having it in the defined does not mean one won't exist in the future.

I don't think it will, newer Samsungs already use a new maxim controller.

Stranger things have happened. Let's take the 'better to be safe than sorry' approach and future-proof this the best we can. Let's do a proper bounds check for supported devices instead please.

Signature · 1 line
Lee Jones [李琼斯]