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: <1399461043.22811.3.camel@AMDC1943>
Date:	Wed, 07 May 2014 13:10:43 +0200
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org, Sangbeom Kim <sbkim73@...sung.com>
Subject: Re: [RFT PATCH] regulator: s2mpa01: Use correct register for buck[36]
 ramp delay

Hi Sachin,


I'm looking at SM-N7505 JB Open source code and it seems that I was
wrong - the ramp delay for buck1 is set in wrong register, not buck3.

I don't have the datasheet for S2MPA01 so could you confirm the
registers for ramp delay of buck1, buck3 and buck6?


Best regards,
Krzysztof


On śro, 2014-05-07 at 11:52 +0200, Krzysztof Kozlowski wrote:
> Buck1 and buck6 share the field (offset 4) in ramp delay register
> (S2MPA01_REG_RAMP1). The buck3 uses its own field in S2MPA01_REG_RAMP2
> register, also at offset 4.
> 
> The driver interchanged the registers for ramp delay of buck3 and buck6.
> This lead to updating ramp delay for wrong buck (buck3 instead of buck6
> and vice versa).
> 
> Cc: <stable@...r.kernel.org>
> Fixes: f18792714608 ("regulator: Add support for S2MPA01 regulator")
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
> ---
>  drivers/regulator/s2mpa01.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/s2mpa01.c b/drivers/regulator/s2mpa01.c
> index f19a30f0fb42..67a5ab335dae 100644
> --- a/drivers/regulator/s2mpa01.c
> +++ b/drivers/regulator/s2mpa01.c
> @@ -137,17 +137,16 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
>  		enable_shift = S2MPA01_BUCK3_RAMP_EN_SHIFT;
>  		if (!ramp_delay) {
>  			ramp_enable = 0;
>  			break;
>  		}
>  
>  		s2mpa01->ramp_delay3 = ramp_delay;
>  		ramp_shift = S2MPA01_BUCK3_RAMP_SHIFT;
> -		ramp_reg = S2MPA01_REG_RAMP1;
>  		break;
>  	case S2MPA01_BUCK4:
>  		enable_shift = S2MPA01_BUCK4_RAMP_EN_SHIFT;
>  		if (!ramp_delay) {
>  			ramp_enable = 0;
>  			break;
>  		}
>  
> @@ -165,16 +164,17 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
>  		break;
>  	case S2MPA01_BUCK6:
>  		if (ramp_delay > s2mpa01->ramp_delay16)
>  			s2mpa01->ramp_delay16 = ramp_delay;
>  		else
>  			ramp_delay = s2mpa01->ramp_delay16;
>  
>  		ramp_shift = S2MPA01_BUCK16_RAMP_SHIFT;
> +		ramp_reg = S2MPA01_REG_RAMP1;
>  		break;
>  	case S2MPA01_BUCK7:
>  		s2mpa01->ramp_delay7 = ramp_delay;
>  		ramp_shift = S2MPA01_BUCK7_RAMP_SHIFT;
>  		break;
>  	case S2MPA01_BUCK8:
>  	case S2MPA01_BUCK9:
>  	case S2MPA01_BUCK10:

--
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