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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200510162831.xworvkphco4df326@earth.universe>
Date:   Sun, 10 May 2020 18:28:31 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     David Heidelberg <david@...t.cz>
Cc:     Jonghwa Lee <jonghwa3.lee@...sung.com>,
        Chanwoo Choi <cw00.choi@...sung.com>,
        Myungjoo Ham <myungjoo.ham@...sung.com>,
        Sumit Semwal <sumit.semwal@...aro.org>,
        John Stultz <john.stultz@...aro.org>,
        Vinay Simha BN <simhavcs@...il.com>,
        mika.westerberg@...ux.intel.com, ramakrishna.pallala@...el.com,
        Dmitry Osipenko <digetx@...il.com>, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/9] power: supply: smb347-charger: Add delay before
 getting IRQSTAT

Hi,

On Sun, Mar 29, 2020 at 06:15:45PM +0200, David Heidelberg wrote:
> This delay-fix is picked up from downstream driver,
> we measured that 25 - 35 ms delay ensure that we get required data.
> 
> Tested on SMB347 on Nexus 7 2012. Otherwise IRQSTAT_E fails to provide
> correct information.
> 
> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
> Signed-off-by: David Heidelberg <david@...t.cz>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/smb347-charger.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/power/supply/smb347-charger.c b/drivers/power/supply/smb347-charger.c
> index d102921b3ab2..f99026d81f2a 100644
> --- a/drivers/power/supply/smb347-charger.c
> +++ b/drivers/power/supply/smb347-charger.c
> @@ -8,6 +8,7 @@
>   *          Mika Westerberg <mika.westerberg@...ux.intel.com>
>   */
>  
> +#include <linux/delay.h>
>  #include <linux/err.h>
>  #include <linux/gpio.h>
>  #include <linux/kernel.h>
> @@ -708,6 +709,9 @@ static irqreturn_t smb347_interrupt(int irq, void *data)
>  	bool handled = false;
>  	int ret;
>  
> +	/* SMB347 it needs at least 20ms for setting IRQSTAT_E_*IN_UV_IRQ */
> +	usleep_range(25000, 35000);
> +
>  	ret = regmap_read(smb->regmap, STAT_C, &stat_c);
>  	if (ret < 0) {
>  		dev_warn(smb->dev, "reading STAT_C failed\n");
> -- 
> 2.25.0
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ