Re: [PATCH v2 06/12] mfd: sec: add support for S2MU005 PMIC

From: André Draszik

Date: Tue Feb 10 2026 - 04:54:56 EST


On Thu, 2026-02-05 at 21:02 +0530, Kaustabh Chakraborty wrote:
> On 2026-02-04 15:23 +00:00, André Draszik wrote:
> > Hi,
> >
> > On Mon, 2026-01-26 at 00:37 +0530, Kaustabh Chakraborty wrote:
> > > Samsung's S2MU005 PMIC includes subdevices for a charger, an MUIC (Micro
> > > USB Interface Controller), and flash and RGB LED controllers.
> > >
> > > S2MU005's interrupt registers can be properly divided into three regmap
> > > IRQ chips, one each for the charger, flash LEDs, and the MUIC.
> > >
> > > Add initial support for S2MU005 in the PMIC driver, along with it's three
> > > interrupt chips.
> > >
> > > Signed-off-by: Kaustabh Chakraborty <kauschluss@xxxxxxxxxxx>
> > > ---
> > >  drivers/mfd/sec-common.c            |  16 ++
> > >  drivers/mfd/sec-i2c.c               |  12 ++
> > >  drivers/mfd/sec-irq.c               |  74 ++++++++
> > >  include/linux/mfd/samsung/core.h    |   1 +
> > >  include/linux/mfd/samsung/irq.h     |  66 ++++++++
> > >  include/linux/mfd/samsung/s2mu005.h | 328 ++++++++++++++++++++++++++++++++++++
> > >  6 files changed, 497 insertions(+)
> > >
>
> [...]
>
> > > diff --git a/drivers/mfd/sec-i2c.c b/drivers/mfd/sec-i2c.c
> > > index 3132b849b4bc4..3f1d70cc3292b 100644
> > > --- a/drivers/mfd/sec-i2c.c
> > > +++ b/drivers/mfd/sec-i2c.c
> > > @@ -17,6 +17,7 @@
> > >  #include <linux/mfd/samsung/s2mps14.h>
> > >  #include <linux/mfd/samsung/s2mps15.h>
> > >  #include <linux/mfd/samsung/s2mpu02.h>
> > > +#include <linux/mfd/samsung/s2mu005.h>
> > >  #include <linux/mfd/samsung/s5m8767.h>
> > >  #include <linux/mod_devicetable.h>
> > >  #include <linux/module.h>
> > > @@ -130,6 +131,11 @@ static const struct regmap_config s2mpu05_regmap_config = {
> > >   .val_bits = 8,
> > >  };
> > >  
> > > +static const struct regmap_config s2mu005_regmap_config = {
> > > + .reg_bits = 8,
> > > + .val_bits = 8,
> > > +};
> >
> > No cache? And what is the .max_register value?
> >
>
> This was in the previous revision, but I ended up removing it because
> (at least I thought at that time) interfered with interrupts firing in
> some way. The actual issue was unrelated, so I will add it back.
>
> However, there is also another thing I see in logs:
>
> sec-pmic-i2c 2-003d: using zero-initialized flat cache, this may cause unexpected behavior
>
> This is due to REGCACHE_FLAT, I am not sure if I should just ignore
> this.

I think the error might be because you should also specify num_reg_defaults_raw:

.max_register = xxx,
.num_reg_defaults_raw = xxx + 1,


Cheers,
Andre'