Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751247Ab2FIEUU (ORCPT ); Sat, 9 Jun 2012 00:20:20 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:40961 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852Ab2FIEUS convert rfc822-to-8bit (ORCPT ); Sat, 9 Jun 2012 00:20:18 -0400 MIME-Version: 1.0 In-Reply-To: <1339147304.5216.1.camel@phoenix> References: <1339147304.5216.1.camel@phoenix> Date: Sat, 9 Jun 2012 09:50:18 +0530 Message-ID: Subject: Re: [PATCH RFT] regulator: max77686: Fix the delay time for set_voltage_time_sel From: Yadwinder Singh Brar To: Axel Lin Cc: linux-kernel@vger.kernel.org, Chiwoong Byun , Jonghwa Lee , Myungjoo Ham , Kyungmin Park , Yadwinder Singh Brar , Mark Brown Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1679 Lines: 43 On Fri, Jun 8, 2012 at 2:51 PM, Axel Lin wrote: > rdev->desc->uV_step * abs(new_selector - old_selector) returns uV. > The unit of ramp_rate is mV/us. > Thus 1000 should be multiplied. > > Signed-off-by: Axel Lin > --- > ?drivers/regulator/max77686.c | ? ?4 ++-- > ?1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/regulator/max77686.c b/drivers/regulator/max77686.c > index b76a038..10bf65a 100644 > --- a/drivers/regulator/max77686.c > +++ b/drivers/regulator/max77686.c > @@ -78,7 +78,7 @@ static int max77686_set_dvs_voltage_time_sel(struct regulator_dev *rdev, > > ? ? ? ?return DIV_ROUND_UP(rdev->desc->uV_step * > ? ? ? ? ? ? ? ? ? ? ? ? ? ?abs(new_selector - old_selector), > - ? ? ? ? ? ? ? ? ? ? ? ? ? ramp_rate[max77686->ramp_delay]); > + ? ? ? ? ? ? ? ? ? ? ? ? ? ramp_rate[max77686->ramp_delay] * 1000); > ?} > > ?static int max77686_set_voltage_time_sel(struct regulator_dev *rdev, > @@ -86,7 +86,7 @@ static int max77686_set_voltage_time_sel(struct regulator_dev *rdev, > ?{ > ? ? ? ?/* Unconditionally 100 mV/us */ > ? ? ? ?return DIV_ROUND_UP(rdev->desc->uV_step * > - ? ? ? ? ? ? ? ? ? ? ? ? ? abs(new_selector - old_selector), 100); > + ? ? ? ? ? ? ? ? ? ? ? ? ? abs(new_selector - old_selector), 100 * 1000); > ?} > > ?static struct regulator_ops max77686_ops = { > -- Reviewed-by: Yadwinder Singh Brar Thanks, Yadwinder. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/