lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 10 Oct 2014 12:08:03 +0200
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Lee Jones <lee.jones@...aro.org>
Cc:	MyungJoo Ham <myungjoo.ham@...sung.com>,
	Chanwoo Choi <cw00.choi@...sung.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	linux-kernel@...r.kernel.org,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	stable@...r.kernel.org
Subject: Re: [PATCH fixes 2/2] extcon: max77693: Fix always masked MUIC
 interrupts

On pią, 2014-10-10 at 10:48 +0100, Lee Jones wrote:
> On Fri, 10 Oct 2014, Krzysztof Kozlowski wrote:
> 
> > On pią, 2014-10-10 at 09:58 +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. Do
> > > > it in extcon driver.
> > > > 
> > > > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
> > > > Cc: <stable@...r.kernel.org>
> > > > Fixes: 342d669c1ee4 ("mfd: max77693: Handle IRQs using regmap")
> > > > ---
> > > >  drivers/extcon/extcon-max77693.c     | 16 ++++++++++++++++
> > > >  include/linux/mfd/max77693-private.h |  5 +++++
> > > >  2 files changed, 21 insertions(+)
> > > 
> > > Did you run this through checkpatch?
> > 
> > Yes, no complains.
> 
> Run it again!  One of those lines is clearly over 80 chars.

>From the checkpatch still nothing. Really! :)

I believe you're mentioning the line:
dev_err(&pdev->dev, "Could not unmask MUIC interrupt in INTSRC: %d\n",

Probably checkpatch does not complain about it because it is the string
who dares to exceed 80 chars. I can split this into:

dev_err(&pdev->dev,
	"Could not unmask MUIC interrupt in INTSRC: %d\n",
	ret);

Best regards,
Krzysztof

> 
> > > > diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> > > > index 490e27475bac..d3adacf3187f 100644
> > > > --- a/drivers/extcon/extcon-max77693.c
> > > > +++ b/drivers/extcon/extcon-max77693.c
> > > > @@ -1176,6 +1176,22 @@ static int max77693_muic_probe(struct platform_device *pdev)
> > > >  		}
> > > >  	}
> > > >  
> > > > +	if (i) {
> > > > +		/*
> > > > +		 * i>0, at least one MUIC interrupt requested so need to unmask
> > > > +		 * MUIC interrupt in INTSRC register. Without that MUIC
> > > > +		 * interrupts will not be reported.
> > > > +		 */
> > > > +		ret = regmap_update_bits(max77693->regmap,
> > > > +				MAX77693_PMIC_REG_INTSRC_MASK, SRC_IRQ_MUIC,
> > > > +				~SRC_IRQ_MUIC);
> > > > +		if (ret < 0) {
> > > > +			dev_err(&pdev->dev, "Could not unmask MUIC interrupt in INTSRC: %d\n",
> > > > +					ret);
> > > > +			return ret;
> > > > +		}
> > > > +	}
> > > > +
> > > >  	/* Initialize extcon device */
> > > >  	info->edev = devm_extcon_dev_allocate(&pdev->dev,
> > > >  					      max77693_extcon_cable);
> > > > diff --git a/include/linux/mfd/max77693-private.h b/include/linux/mfd/max77693-private.h
> > > > index e1b2b61285b9..4f1a80b66ecf 100644
> > > > --- a/include/linux/mfd/max77693-private.h
> > > > +++ b/include/linux/mfd/max77693-private.h
> > > > @@ -438,6 +438,11 @@ 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 LED_IRQ_FLED2_OPEN		BIT(0)
> > > >  #define LED_IRQ_FLED2_SHORT		BIT(1)
> > > >  #define LED_IRQ_FLED1_OPEN		BIT(2)
> > > 
> > 
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ