All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Lee Jones <lee.jones@linaro.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	linux-kernel@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	stable@vger.kernel.org
Subject: Re: [PATCH fixes v2] mfd: max77693: Fix always masked MUIC interrupts
Date: Wed, 22 Oct 2014 11:28:43 +0200	[thread overview]
Message-ID: <1413970123.2504.2.camel@AMDC1943> (raw)
In-Reply-To: <20141010105600.GL26795@lee--X1>

On pią, 2014-10-10 at 11:56 +0100, Lee Jones wrote:
> On Fri, 10 Oct 2014, Krzysztof Kozlowski wrote:
> 
> > All interrupts coming from MUIC were ignored because interrupt source
> > register was masked.
> > 
> > The Maxim 77693 has a "interrupt source" - a separate register and interrupts
> > which give information about PMIC block triggering the individual
> > interrupt (charger, topsys, MUIC, flash LED).
> > 
> > By default bootloader could initialize this register to "mask all"
> > value. In such case (observed on Trats2 board) MUIC interrupts won't be
> > generated regardless of their mask status. Regmap irq chip was unmasking
> > individual MUIC interrupts but the source was masked
> > 
> > Before introducing regmap irq chip this interrupt source was unmasked,
> > read and acked. Reading and acking is not necessary but unmasking is.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> > Cc: <stable@vger.kernel.org>
> > Fixes: 342d669c1ee4 ("mfd: max77693: Handle IRQs using regmap")
> 
> Applied to -fixes until someone complains.

Hi Lee,

I cannot find this patch on gitweb (MFD tree), have you applied it?

If not then could you squash it with:
mfd: max77693: Fix a truncate warning
https://lkml.org/lkml/2014/10/14/161

If you wish I could resend it.

Best regards,
Krzysztof

> 
> > ---
> > 
> > Changes since v1:
> > 1. Do the unmasking in main MFD driver. Additionally unmask all
> >    interrupts, not only MUIC. Suggested by Chanwoo Choi.
> > ---
> >  drivers/mfd/max77693.c               | 12 ++++++++++++
> >  include/linux/mfd/max77693-private.h |  7 +++++++
> >  2 files changed, 19 insertions(+)
> > 
> > diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c
> > index 4b54da1ff7ab..4e4e6a1a6301 100644
> > --- a/drivers/mfd/max77693.c
> > +++ b/drivers/mfd/max77693.c
> > @@ -253,6 +253,17 @@ static int max77693_i2c_probe(struct i2c_client *i2c,
> >  		goto err_irq_muic;
> >  	}
> >  
> > +	/* Unmask interrupts from all blocks in interrupt source register */
> > +	ret = regmap_update_bits(max77693->regmap,
> > +				MAX77693_PMIC_REG_INTSRC_MASK,
> > +				SRC_IRQ_ALL, ~SRC_IRQ_ALL);
> > +	if (ret < 0) {
> > +		dev_err(max77693->dev,
> > +			"Could not unmask interrupts in INTSRC: %d\n",
> > +			ret);
> > +		goto err_intsrc;
> > +	}
> > +
> >  	pm_runtime_set_active(max77693->dev);
> >  
> >  	ret = mfd_add_devices(max77693->dev, -1, max77693_devs,
> > @@ -264,6 +275,7 @@ static int max77693_i2c_probe(struct i2c_client *i2c,
> >  
> >  err_mfd:
> >  	mfd_remove_devices(max77693->dev);
> > +err_intsrc:
> >  	regmap_del_irq_chip(max77693->irq, max77693->irq_data_muic);
> >  err_irq_muic:
> >  	regmap_del_irq_chip(max77693->irq, max77693->irq_data_charger);
> > diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
> > index e1b2b61285b9..15fed5365a20 100644
> > --- a/include/linux/mfd/max77693-private.h
> > +++ b/include/linux/mfd/max77693-private.h
> > @@ -438,6 +438,13 @@ enum max77693_irq_source {
> >  	MAX77693_IRQ_GROUP_NR,
> >  };
> >  
> > +#define SRC_IRQ_CHARGER			BIT(0)
> > +#define SRC_IRQ_TOP			BIT(1)
> > +#define SRC_IRQ_FLASH			BIT(2)
> > +#define SRC_IRQ_MUIC			BIT(3)
> > +#define SRC_IRQ_ALL			(SRC_IRQ_CHARGER | SRC_IRQ_TOP \
> > +						| SRC_IRQ_FLASH | SRC_IRQ_MUIC)
> > +
> >  #define LED_IRQ_FLED2_OPEN		BIT(0)
> >  #define LED_IRQ_FLED2_SHORT		BIT(1)
> >  #define LED_IRQ_FLED1_OPEN		BIT(2)
> 


  reply	other threads:[~2014-10-22  9:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10 10:48 [PATCH fixes v2] mfd: max77693: Fix always masked MUIC interrupts Krzysztof Kozlowski
2014-10-10 10:56 ` Lee Jones
2014-10-22  9:28   ` Krzysztof Kozlowski [this message]
2014-10-22 11:37     ` Lee Jones
2014-10-10 10:56 ` Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413970123.2504.2.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=myungjoo.ham@samsung.com \
    --cc=sameo@linux.intel.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.