From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751312AbbCTKzz (ORCPT ); Fri, 20 Mar 2015 06:55:55 -0400 Received: from mail-qg0-f44.google.com ([209.85.192.44]:34867 "EHLO mail-qg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbbCTKzu (ORCPT ); Fri, 20 Mar 2015 06:55:50 -0400 MIME-Version: 1.0 In-Reply-To: <20150319113646.GQ2869@sirena.org.uk> References: <1426112117-18220-1-git-send-email-dianders@chromium.org> <1426112117-18220-2-git-send-email-dianders@chromium.org> <20150319113646.GQ2869@sirena.org.uk> Date: Fri, 20 Mar 2015 11:55:50 +0100 Message-ID: Subject: Re: [PATCH v4 2/4] mmc: core: Add mmc_regulator_set_vqmmc() From: Ulf Hansson To: Mark Brown Cc: Doug Anderson , Heiko Stuebner , Jaehoon Chung , Seungwon Jeon , Alexandru Stan , Alim Akhtar , Sonny Rao , Andrew Bresticker , Addy Ke , Javier Martinez Canillas , "open list:ARM/Rockchip SoC..." , "linux-arm-kernel@lists.infradead.org" , Chris Ball , Johan Rudholm , Adrian Hunter , Tim Kryger , Andrew Gabbasov , Sascha Hauer , linux-mmc , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19 March 2015 at 12:36, Mark Brown wrote: > On Thu, Mar 19, 2015 at 12:14:11PM +0100, Ulf Hansson wrote: > >> Agree. Moreover we need that API to also pick the closest value to >> target, when trying the range "target->minimum". I also believe it > > The implementation *should* do that anyway, it's just not trivial to > implement in an efficient fashion with the current information we have > from drivers. The APIs regulator_count_voltages() and regulator_list_voltage(), are currently used from the mmc core to find out which voltages that is supported (with 0.1V granularity). Then that information can be used when trying to set a new voltage. But I guess such a wrapper API is out of the question? Anyway, I get the feeling that we will need to do the same for this case. > >> would be good to allow both upper and lower limits to be zero. > > The lower limit can be zero already though it isn't clear to me that > this is useful. Setting an upper limit of zero seems nonsensical, an > upper limit that is lower than the lower limit isn't terribly obvious > and removing the upper limit isn't safe - it means that we'll happily > oversupply things which is a road to physical damage. I am not sure I follow here. In the regulator_set_voltage_tol() you can only specifiy one limit (tolerance?). What Dough proposed was to add a new API which can have both a low tolerance value and a high tolerance value. Kind regards Uffe