Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752085AbdF3Dzj (ORCPT ); Thu, 29 Jun 2017 23:55:39 -0400 Received: from mail-pg0-f44.google.com ([74.125.83.44]:32913 "EHLO mail-pg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751333AbdF3Dzh (ORCPT ); Thu, 29 Jun 2017 23:55:37 -0400 Date: Fri, 30 Jun 2017 09:25:33 +0530 From: Viresh Kumar To: Chen-Yu Tsai Cc: "Enrico Weigelt, metux IT consult" , Rafael Wysocki , Vincent Guittot , Rob Herring , Greg Kroah-Hartman , Stephen Boyd , linux-kernel , Mark Brown , rnayak@codeaurora.org, Shiraz Hashim , linux-arm-kernel Subject: Re: [RFC 0/5] drivers: Add boot constraints core Message-ID: <20170630035533.GV29665@vireshk-i7> References: <20170629144711.GO29665@vireshk-i7> <1522ae7b-fd5b-5403-62bf-b0140e116d65@gr13.net> <20170630031648.GR29665@vireshk-i7> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 909 Lines: 32 On 30-06-17, 11:33, Chen-Yu Tsai wrote: > AFAIK regulator constraints are supposed to satisfy all users of it. Right. > >> >Let me try with an example. A regulator is shared between LCD and DMA > >> >controller. > >> > > >> >Operable ranges of the regulator: 1.8 - 3.0 V > >> >Range required by LCD: 2.0 - 3.0 V > >> >Range required by DMA: 1.8 - 2.5 V > > So for the example here, the regulator constraint should be 2.5 - 3.0 V, > or the intersection of all voltage requirements. Had a look at regulator_check_consumers() and the range selected by it is the *highest* min_uV and *lowest* max_uV, to find that intersection point. For LCD: min_uV = 2.0 V, max_uV = 3.0 V For DMA: min_uV = 1.8 V, max_uV = 2.5 V Highest min_uV = 2.0 V Lowest max_uV = 2.5 V And so I mentioned the regulator's final range (that satisfies all consumers) is 2 - 2.5 V. Why do you say it should be 2.5 - 3.0 V ? -- viresh