* [PATCH v1] mfd: max77705: support revision 0x2
@ 2025-10-14 4:32 Eric Gonçalves
2025-10-23 13:17 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Eric Gonçalves @ 2025-10-14 4:32 UTC (permalink / raw)
To: Krzysztof Kozlowski, Chanwoo Choi, Lee Jones; +Cc: linux-kernel
Revision 0x2 has been tested on the r0q (Galaxy S22) board.
Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
---
drivers/mfd/max77705.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
index e1a9bfd65856..5201a4c9c3f5 100644
--- a/drivers/mfd/max77705.c
+++ b/drivers/mfd/max77705.c
@@ -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);
--
2.51.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mfd: max77705: support revision 0x2
2025-10-14 4:32 [PATCH v1] mfd: max77705: support revision 0x2 Eric Gonçalves
@ 2025-10-23 13:17 ` Lee Jones
2025-10-23 13:46 ` Ghatto
0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2025-10-23 13:17 UTC (permalink / raw)
To: Eric Gonçalves; +Cc: Krzysztof Kozlowski, Chanwoo Choi, linux-kernel
On Tue, 14 Oct 2025, Eric Gonçalves wrote:
> Revision 0x2 has been tested on the r0q (Galaxy S22) board.
>
> Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> ---
> drivers/mfd/max77705.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
> index e1a9bfd65856..5201a4c9c3f5 100644
> --- a/drivers/mfd/max77705.c
> +++ b/drivers/mfd/max77705.c
> @@ -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)
> /* Active Discharge Enable */
> regmap_update_bits(max77705->regmap, MAX77705_PMIC_REG_MAINCTRL1, 1, 1);
> --
> 2.51.0
>
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mfd: max77705: support revision 0x2
2025-10-23 13:17 ` Lee Jones
@ 2025-10-23 13:46 ` Ghatto
2025-10-23 14:21 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Ghatto @ 2025-10-23 13:46 UTC (permalink / raw)
To: Lee Jones; +Cc: Krzysztof Kozlowski, Chanwoo Choi, linux-kernel
On Thu, Oct 23, 2025 at 10:17 AM Lee Jones <lee@kernel.org> wrote:
>
> On Tue, 14 Oct 2025, Eric Gonçalves wrote:
>
> > Revision 0x2 has been tested on the r0q (Galaxy S22) board.
> >
> > Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> > ---
> > drivers/mfd/max77705.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
> > index e1a9bfd65856..5201a4c9c3f5 100644
> > --- a/drivers/mfd/max77705.c
> > +++ b/drivers/mfd/max77705.c
> > @@ -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?
PASS4 doesn't exist from what I've seen on the max77705 header files.
>
> What about changing only the first line to:
>
> if (pmic_rev < MAX77705_PASS2 || pmic_rev > MAX77705_PASS3)
>
> > /* Active Discharge Enable */
> > regmap_update_bits(max77705->regmap, MAX77705_PMIC_REG_MAINCTRL1, 1, 1);
> > --
> > 2.51.0
> >
>
> --
> Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mfd: max77705: support revision 0x2
2025-10-23 13:46 ` Ghatto
@ 2025-10-23 14:21 ` Lee Jones
2025-10-23 15:02 ` Eric Gonçalves
0 siblings, 1 reply; 6+ messages in thread
From: Lee Jones @ 2025-10-23 14:21 UTC (permalink / raw)
To: Ghatto; +Cc: Krzysztof Kozlowski, Chanwoo Choi, linux-kernel
On Thu, 23 Oct 2025, Ghatto wrote:
> On Thu, Oct 23, 2025 at 10:17 AM Lee Jones <lee@kernel.org> wrote:
> >
> > On Tue, 14 Oct 2025, Eric Gonçalves wrote:
> >
> > > Revision 0x2 has been tested on the r0q (Galaxy S22) board.
> > >
> > > Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> > > ---
> > > drivers/mfd/max77705.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
> > > index e1a9bfd65856..5201a4c9c3f5 100644
> > > --- a/drivers/mfd/max77705.c
> > > +++ b/drivers/mfd/max77705.c
> > > @@ -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?
> 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.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mfd: max77705: support revision 0x2
2025-10-23 14:21 ` Lee Jones
@ 2025-10-23 15:02 ` Eric Gonçalves
2025-11-06 13:41 ` Lee Jones
0 siblings, 1 reply; 6+ messages in thread
From: Eric Gonçalves @ 2025-10-23 15:02 UTC (permalink / raw)
To: Lee Jones; +Cc: Krzysztof Kozlowski, Chanwoo Choi, linux-kernel
On October 23, 2025 11:21:44 AM GMT-03:00, Lee Jones <lee@kernel.org> wrote:
>On Thu, 23 Oct 2025, Ghatto wrote:
>
>> On Thu, Oct 23, 2025 at 10:17 AM Lee Jones <lee@kernel.org> wrote:
>> >
>> > On Tue, 14 Oct 2025, Eric Gonçalves wrote:
>> >
>> > > Revision 0x2 has been tested on the r0q (Galaxy S22) board.
>> > >
>> > > Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
>> > > ---
>> > > drivers/mfd/max77705.c | 4 ++--
>> > > 1 file changed, 2 insertions(+), 2 deletions(-)
>> > >
>> > > diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
>> > > index e1a9bfd65856..5201a4c9c3f5 100644
>> > > --- a/drivers/mfd/max77705.c
>> > > +++ b/drivers/mfd/max77705.c
>> > > @@ -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?
>> 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.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v1] mfd: max77705: support revision 0x2
2025-10-23 15:02 ` Eric Gonçalves
@ 2025-11-06 13:41 ` Lee Jones
0 siblings, 0 replies; 6+ messages in thread
From: Lee Jones @ 2025-11-06 13:41 UTC (permalink / raw)
To: Eric Gonçalves; +Cc: Krzysztof Kozlowski, Chanwoo Choi, linux-kernel
On Thu, 23 Oct 2025, Eric Gonçalves wrote:
>
>
> On October 23, 2025 11:21:44 AM GMT-03:00, Lee Jones <lee@kernel.org> wrote:
> >On Thu, 23 Oct 2025, Ghatto wrote:
> >
> >> On Thu, Oct 23, 2025 at 10:17 AM Lee Jones <lee@kernel.org> wrote:
> >> >
> >> > On Tue, 14 Oct 2025, Eric Gonçalves wrote:
> >> >
> >> > > Revision 0x2 has been tested on the r0q (Galaxy S22) board.
> >> > >
> >> > > Signed-off-by: Eric Gonçalves <ghatto404@gmail.com>
> >> > > ---
> >> > > drivers/mfd/max77705.c | 4 ++--
> >> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> >> > >
> >> > > diff --git a/drivers/mfd/max77705.c b/drivers/mfd/max77705.c
> >> > > index e1a9bfd65856..5201a4c9c3f5 100644
> >> > > --- a/drivers/mfd/max77705.c
> >> > > +++ b/drivers/mfd/max77705.c
> >> > > @@ -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?
> >> 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.
--
Lee Jones [李琼斯]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-06 13:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-14 4:32 [PATCH v1] mfd: max77705: support revision 0x2 Eric Gonçalves
2025-10-23 13:17 ` Lee Jones
2025-10-23 13:46 ` Ghatto
2025-10-23 14:21 ` Lee Jones
2025-10-23 15:02 ` Eric Gonçalves
2025-11-06 13:41 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox