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: <574C021A.2080502@samsung.com>
Date:	Mon, 30 May 2016 11:04:26 +0200
From:	Krzysztof Kozlowski <k.kozlowski@...sung.com>
To:	Axel Lin <axel.lin@...ics.com>
Cc:	Mark Brown <broonie@...nel.org>,
	Laxman Dewangan <ldewangan@...dia.com>,
	Mikko Perttunen <mperttunen@...dia.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RFT] regulator: max8972: Fix setting ramp delay

On 05/30/2016 10:52 AM, Axel Lin wrote:
> 2016-05-30 16:48 GMT+08:00 Krzysztof Kozlowski <k.kozlowski@...sung.com>:
>> On 05/29/2016 01:16 PM, Axel Lin wrote:
>>> Current code can set ramp delay to a wrong setting that the return value
>>> from .set_voltage_time_sel is not enough for proper delay.
>>
>> I don't understand what yo wanted to say here. What wrong setting is
>> possible? Why do you mention set_voltage_time_sel() here?
>>
>> Can you elaborate?
>>
>> The only difference I spotted is how you round up the ramp_delay values.
> 
> Assume rdev->constraints->ramp_delay is 20000.
> 
> Original code will set MAX8973_RAMP_12mV_PER_US.
> 
> However, in regulator_set_voltage_time_sel()
>         return DIV_ROUND_UP(abs(new_volt - old_volt), ramp_delay);
> 
> This return value is not enough if the device is using MAX8973_RAMP_12mV_PER_US
> setting.

Thanks, now it makes sense but the commit message needs improvements.
The problem is that current code for .set_ramp_delay() rounds down the
value written to register, while the implementation of
.set_voltage_time_sel() works on original constraints (not rounded down).

Please, fix the message.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ