From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756075AbbHYWxt (ORCPT ); Tue, 25 Aug 2015 18:53:49 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:33680 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752402AbbHYWxr (ORCPT ); Tue, 25 Aug 2015 18:53:47 -0400 Date: Tue, 25 Aug 2015 15:53:45 -0700 From: Stephen Boyd To: Viresh Kumar Cc: broonie@kernel.org, linaro-kernel@lists.linaro.org, nm@ti.com, Liam Girdwood , "open list:VOLTAGE AND CURRENT REGULATOR FRAMEWORK" Subject: Re: [PATCH V3] regulator: core: Define regulator_set_voltage_triplet() Message-ID: <20150825225345.GM19120@codeaurora.org> References: <5f42eb06c47a316cd7138e4f75a4176eea4fb202.1439779404.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5f42eb06c47a316cd7138e4f75a4176eea4fb202.1439779404.git.viresh.kumar@linaro.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/17, Viresh Kumar wrote: > Voltage tolerance isn't necessarily same on both sides of the target > voltage and regulator_set_voltage_tol() wouldn't be suitable in such > cases. > > Add another routine regulator_set_voltage_triplet(), which accepts > target, min and max voltages as arguments. > > This first tries to set the voltage between the target voltage and the > upper limit, then fall back on the full range. The idea behind this is > to set regulator's voltage as close to the target voltage, as possible. > > Based on regulator_set_voltage_tol(). > > Signed-off-by: Viresh Kumar > --- Looks good to me. Reviewed-by: Stephen Boyd -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project