[PATCH 4/6] mfd: max77759: modify irq configs

André Draszik andre.draszik at linaro.org
Tue Nov 25 23:36:35 PST 2025


On Wed, 2025-11-26 at 06:44 +0000, André Draszik wrote:
> Hi Amit,
> 
> On Tue, 2025-11-25 at 17:10 -0800, Amit Sunil Dhamne wrote:
> > Hi André,
> > 
> > On 11/23/25 10:21 PM, André Draszik wrote:
> > > Hi Amit,
> > > 
> > > Thanks for your patches to enable the charger!
> > 
> > Ack!
> > 
> > 
> > > > From: Amit Sunil Dhamne <amitsd at google.com>
> > > > 
> > > > Define specific bit-level masks for charger's registers and modify the
> > > > irq mask for charger irq_chip. Also, configure the max77759 interrupt
> > > > lines as active low to all interrupt registrations to ensure the
> > > > interrupt controllers are configured with the correct trigger type.
> > > > 
> > > > Signed-off-by: Amit Sunil Dhamne <amitsd at google.com>
> > > > ---
> > > >   drivers/mfd/max77759.c       | 24 +++++++++++++++++-------
> > > >   include/linux/mfd/max77759.h |  9 +++++++++
> > > >   2 files changed, 26 insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/drivers/mfd/max77759.c b/drivers/mfd/max77759.c
> > > > index 6cf6306c4a3b..5fe22884f362 100644
> > > > --- a/drivers/mfd/max77759.c
> > > > +++ b/drivers/mfd/max77759.c
> > > > @@ -256,8 +256,17 @@ static const struct regmap_irq max77759_topsys_irqs[] = {
> > > >   };
> > > >   
> > > >   static const struct regmap_irq max77759_chgr_irqs[] = {
> > > > -	REGMAP_IRQ_REG(MAX77759_CHARGER_INT_1, 0, GENMASK(7, 0)),
> > > > -	REGMAP_IRQ_REG(MAX77759_CHARGER_INT_2, 1, GENMASK(7, 0)),
> > > > +	REGMAP_IRQ_REG(MAX77759_CHARGER_INT_1, 0,
> > > > +		       MAX77759_CHGR_REG_CHG_INT_AICL |
> > > > +		       MAX77759_CHGR_REG_CHG_INT_CHGIN |
> > > > +		       MAX77759_CHGR_REG_CHG_INT_CHG |
> > > > +		       MAX77759_CHGR_REG_CHG_INT_INLIM),
> > > > +	REGMAP_IRQ_REG(MAX77759_CHARGER_INT_2, 1,
> > > > +		       MAX77759_CHGR_REG_CHG_INT2_BAT_OILO |
> > > > +		       MAX77759_CHGR_REG_CHG_INT2_CHG_STA_CC |
> > > > +		       MAX77759_CHGR_REG_CHG_INT2_CHG_STA_CV |
> > > > +		       MAX77759_CHGR_REG_CHG_INT2_CHG_STA_TO |
> > > > +		       MAX77759_CHGR_REG_CHG_INT2_CHG_STA_DONE),
> > > >   };
> 
> You should also add the remaining bits in each register here, so that the
> regulator-irq can mask them when no user exists. It will only touch the
  ^^^^^^^^^^^^^
  regmap-irq

A.



More information about the linux-arm-kernel mailing list