From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964877AbcGGIuk (ORCPT ); Thu, 7 Jul 2016 04:50:40 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:10936 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964863AbcGGIuh (ORCPT ); Thu, 7 Jul 2016 04:50:37 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 07 Jul 2016 01:48:56 -0700 Message-ID: <577E1487.9010000@nvidia.com> Date: Thu, 7 Jul 2016 14:06:23 +0530 From: Laxman Dewangan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Douglas Anderson , Mark Brown CC: , , , , "Heiko Stuebner" , , , , Subject: Re: [PATCH v2] regulator: pwm: Fix regulator ramp delay for continuous mode References: <1467830521-15300-1-git-send-email-dianders@chromium.org> In-Reply-To: <1467830521-15300-1-git-send-email-dianders@chromium.org> X-Originating-IP: [10.19.65.30] X-ClientProxiedBy: DRUKMAIL101.nvidia.com (10.25.59.19) To bgmail102.nvidia.com (10.25.59.11) Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 07 July 2016 12:12 AM, Douglas Anderson wrote: > The original commit adding support for continuous voltage mode didn't > handle the regulator ramp delay properly. It treated the delay as a > fixed delay in uS despite the property being defined as uV / uS. Let's > adjust it. Luckily there appear to be no users of this ramp delay for > PWM regulators (as per grepping through device trees in linuxnext). > > Note also that the upper bound of usleep_range probably shouldn't be a > full 1 ms longer than the lower bound since I've seen plenty of hardware > with a ramp rate of ~5000 uS / uV and for small jumps the total delays > are in the tens of uS. 1000 is way too much. We'll try to be dynamic > and use 10%. > > NOTE: This commit doesn't add support for regulator-enable-ramp-delay. > That could be done in a future patch when someone has a user of that > featre. > > Though this patch is shows as "fixing" a bug, there are no actual known > users of continuous mode PWM regulator w/ ramp delay in mainline and so > this likely won't have any effect on anyone unless they are working > out-of-tree with private patches. For anyone in this state, it is > highly encouraged to also pick Boris Brezillon's WIP patches to get > yourself a reliable and glitch-free regulator. > > Fixes: 4773be185a0f ("regulator: pwm-regulator: Add support for continuous-voltage") > Signed-off-by: Douglas Anderson Looks fine here. Acked-by: Laxman Dewangan BTW, for some PWM regulator, the settling time for voltage change is same for any steps.