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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-id: <1462057843.591181433480053438.JavaMail.weblogic@epmlwas08a>
Date:	Fri, 05 Jun 2015 04:54:13 +0000 (GMT)
From:	MyungJoo Ham <myungjoo.ham@...sung.com>
To:	김재원 <jaewon02.kim@...sung.com>,
	최찬우 <cw00.choi@...sung.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-samsung-soc@...r.kernel.org" 
	<linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH] extcon: max77843: Clear IRQ bits state before request IRQ

>   
>  IRQ signal before driver probe is needless because driver sends
> current state after platform booting done.
> So, this patch clears MUIC IRQ bits before request IRQ.
> 
> Signed-off-by: Jaewon Kim <jaewon02.kim@...sung.com>
> ---
>  drivers/extcon/extcon-max77843.c |    9 +++++++++
>  1 file changed, 9 insertions(+)

Q1. Is this because the pending bits are USELESS?
or because the pendeing bits incurs INCORRECT behaviors?

Q2. Does clearing (by reading) INT1 do everything you need?
What about INT2 and INT3?

Q3. I presume that "driver sends current state after..." is
coming from the invokation of "queue_delayed_work()" at the end 
of the probe function. It appears that you are only serving
the pending status of "cable detection" with it while INT1
seems to have more functionalities. Does that delayed work
do everything that are pending, really?


Cheers,
MyungJoo

> 
> diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
> index d78a64d..11e09d1 100644
> --- a/drivers/extcon/extcon-max77843.c
> +++ b/drivers/extcon/extcon-max77843.c
> @@ -781,6 +781,15 @@ static int max77843_muic_probe(struct platform_device *pdev)
>  	/* Support virtual irq domain for max77843 MUIC device */
>  	INIT_WORK(&info->irq_work, max77843_muic_irq_work);
>  
> +	/* Clear IRQ bits before request IRQs */
> +	ret = regmap_bulk_read(max77843->regmap_muic,
> +			MAX77843_MUIC_REG_INT1, info->status,
> +			MAX77843_MUIC_IRQ_NUM);
> +	if (ret) {
> +		dev_err(&pdev->dev, "Failed to Clear IRQ bits\n");
> +		goto err_muic_irq;
> +	}
> +
>  	for (i = 0; i < ARRAY_SIZE(max77843_muic_irqs); i++) {
>  		struct max77843_muic_irq *muic_irq = &max77843_muic_irqs[i];
>  		unsigned int virq = 0;
> -- 
> 1.7.9.5
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ