Received: by 10.223.176.5 with SMTP id f5csp775582wra; Wed, 7 Feb 2018 07:22:19 -0800 (PST) X-Google-Smtp-Source: AH8x224pvBsWPkNiDfs4Xu/Tq6CbqqkShXsnCAI02uhBShC07gcXsfNlczrn85loGJq5Mo2q6+sw X-Received: by 10.98.178.8 with SMTP id x8mr6396200pfe.57.1518016938989; Wed, 07 Feb 2018 07:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518016938; cv=none; d=google.com; s=arc-20160816; b=A2ztDbDHeDZK3rn6osZmm20UJ5hUP4FEENHXYoAgSmHL0oAOTpw9UR/DAJnE2rkka0 1vYtcOJrsm/wASSiGZ+g4J4G5QPnz7p71pvts42mOel16JwG+Bhd9KF4EBrQYPPE6gGX 7DrEs0+PZ0oLmxs3nslJ2IzT7s1ZrrMF7wXO5uHB+7DUeQuTGGn4gDLV9zpGz60w8vHA MwBAEcSBHtvK0gLpR8EgTI+umx7TAXoVjvNfcptSyWvZ6nTvLJgDv7rZbAqtu7hrGXyD QGmboE9RKwuyPtbY8rJ2mzPAWTAjA8mPbzov6RgZOiYPPntiqAcYHETcH55++J7WlR1/ 6StA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=1y2IqfSNLWcZPF+OTEr9TmeYySXcrh9pOt+JfwI02m4=; b=0BhQ/yy8E9CrXtBpMhT8NaMu4gnj8h30dydySalcqUn1RdoquzerAThtzUrW8NBYoh zXARtZevvN5Rl9Xqoem0yTI6zF1cPAeDLz4ewIc6qUUa+16SFznd7wQrNXPaZGMdCx1+ hT2/SUFdQwlEX45DEbeZd7EPZjw9bQx+eV1g88YKQI7nPJopgwe1pX5saNlrO1yMb7cm apo9N2S6xApdLvPC8gt3BK8NNPY7Xn3xAXSQZB8+a0rLgD2+28Q+WpMFatKD7jF5scsl 0DCT7onMoj2iK6l1mawfEtwY2cn/JI+t2Au046q4+Gu3TnXY+mSdejxTxb7w6Xhex3Jl rfyA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6-v6si1193556pls.35.2018.02.07.07.22.04; Wed, 07 Feb 2018 07:22:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754561AbeBGPU4 (ORCPT + 99 others); Wed, 7 Feb 2018 10:20:56 -0500 Received: from hqemgate16.nvidia.com ([216.228.121.65]:17616 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754417AbeBGPUw (ORCPT ); Wed, 7 Feb 2018 10:20:52 -0500 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Wed, 07 Feb 2018 07:21:02 -0800 Received: from HQMAIL106.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 07 Feb 2018 07:20:51 -0800 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 07 Feb 2018 07:20:51 -0800 Received: from UKMAIL101.nvidia.com (10.26.138.13) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 7 Feb 2018 15:20:50 +0000 Received: from tbergstrom-lnx.Nvidia.com (10.21.24.170) by UKMAIL101.nvidia.com (10.26.138.13) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 7 Feb 2018 15:20:47 +0000 Received: by tbergstrom-lnx.Nvidia.com (Postfix, from userid 1002) id 7343EF8037C; Wed, 7 Feb 2018 17:20:45 +0200 (EET) Date: Wed, 7 Feb 2018 17:20:45 +0200 From: Peter De Schrijver To: Mark Brown CC: , , , , , , , , , Laxman Dewangan Subject: Re: [PATCH v3 01/11] regulator: core: add API to get voltage constraints Message-ID: <20180207152045.GC5850@tbergstrom-lnx.Nvidia.com> References: <1517934852-23255-1-git-send-email-pdeschrijver@nvidia.com> <1517934852-23255-2-git-send-email-pdeschrijver@nvidia.com> <20180206163544.GI5681@sirena.org.uk> <20180207084744.GG7031@tbergstrom-lnx.Nvidia.com> <20180207104351.GA6003@sirena.org.uk> <20180207123750.GA5850@tbergstrom-lnx.Nvidia.com> <20180207141846.GC6003@sirena.org.uk> <20180207143213.GB5850@tbergstrom-lnx.Nvidia.com> <20180207150155.GD6003@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20180207150155.GD6003@sirena.org.uk> X-NVConfidentiality: public User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.21.24.170] X-ClientProxiedBy: UKMAIL102.nvidia.com (10.26.138.15) To UKMAIL101.nvidia.com (10.26.138.13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 07, 2018 at 03:01:55PM +0000, Mark Brown wrote: > On Wed, Feb 07, 2018 at 04:32:13PM +0200, Peter De Schrijver wrote: > > On Wed, Feb 07, 2018 at 02:18:46PM +0000, Mark Brown wrote: > > > > You're going to have to provide a much better explanation of what this > > > is doing - right now it seems like an abuse of constraints. Client > > > drivers can already determine if a particular voltage they want to set > > > is available via regulator_list_voltage() and so on, that's what > > > constraints are there to set. It sounds like you're trying to use them > > > for something else but you're really not explaining your use case > > > clearly. > > > There is no way to query what voltage I will actually get for a given input > > I looked at patch 2. It looked like an abuse of what constraints do, > and had zero explanation of why it was doing what it was doing. In any > case we need the regulator code and changelog to be clear about what the > interface is for and why it should be used, that's not happening here. > > > voltage. If you read drivers/clk/tegra/cvb. (you did do that right?), you > > will see that there is a minimum and maximum voltage defined by > > charaterization which needs to be capped to the regulator generated voltages > > for those points. > > I can't really tell what you're saying here. If the driver needs to > know if it can set the a given voltage there's already an API for doing > that as I said. If you're trying to convey this minimum and maximum > voltage via the constraints that sounds like an abuse of the constraints. No, what I want is the voltage which the regulator will output for a given regulator_set_voltage request taking constraints, regulator step etc into account. Peter.