Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4672469imm; Wed, 30 May 2018 09:44:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKSaoXNQol457nAL5o/286fNWruYlskpPuTSrXGSBPmO2c6PfYbBVeT+lgIGIUSEYSTJR0f X-Received: by 2002:a63:b91b:: with SMTP id z27-v6mr2786410pge.240.1527698659520; Wed, 30 May 2018 09:44:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527698659; cv=none; d=google.com; s=arc-20160816; b=fZ11xlURNlYPmmC4PCfLobO1uAISuOLoV2ss+qwdEOplaGWGpVpmgKVTedhyMvLFQM wi5bmiPR8d3WbBoT3xhuUwcUoZWtPJVQtAOd2mZ291Hki6m0gqwkC0n/7Vq8Rnnz2TAp mcWv7GK3QmPFaBvQlRhL5nzfrBy7b0qcK0KA08/Y6vTCQi26yCYVM7U6GsEJvO/hL4RB qsZo0p/k/tcALWrtA05LdEZRbzmndKoppHKKFWYqglklQIsEc/TVk5qL/YPTamM2TCGG ygK0vg6oWLIyX/HzWZ/rPyrh35Lvy2L5a+Kxxy7PHctDuzvLPZDf8DVgKvgr8T5VDGlv atLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=pjpsaGiTI+34hakCFNvbppYPoCxPmRWpsSe2Pz5fp0A=; b=nSWCFBLnr8XPPzRYQNqqVnZmNMsYU4Ingbt54nC2WzHSu0HJuH8aXv/Kjqd16MERDp 6jCReooiFpvZAQ7BY8hGg3JcI+D3Ntx9hG2slYVkXMZH2PF2mOCBn1zcKi/TAFpsw3xy IlOToZT5Md1XX37Y3aqQkQD4LwHlOKK1yRmETr4QhhDtHznXvJronq7HiKDqYAfNwF6N euAV4hIVb6ZskR2718miblxF0ZdixVoEp2inS1JyXacb5ytGqjScoOkVdwfuhyrWH9Z7 UX0s2uiodW6pAMzPrX2+XHBtnjNaev3hLInTd+1V+5zgOjYqzVUJOSlsOyTjwWEBv444 N/sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=jVOlrhQp; dkim=fail header.i=@chromium.org header.s=google header.b=Whq/iKDI; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8-v6si24871676pgv.169.2018.05.30.09.44.05; Wed, 30 May 2018 09:44:19 -0700 (PDT) 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; dkim=fail header.i=@google.com header.s=20161025 header.b=jVOlrhQp; dkim=fail header.i=@chromium.org header.s=google header.b=Whq/iKDI; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753915AbeE3Qmz (ORCPT + 99 others); Wed, 30 May 2018 12:42:55 -0400 Received: from mail-ua0-f193.google.com ([209.85.217.193]:43103 "EHLO mail-ua0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932142AbeE3Ql6 (ORCPT ); Wed, 30 May 2018 12:41:58 -0400 Received: by mail-ua0-f193.google.com with SMTP id d4-v6so12938376ual.10 for ; Wed, 30 May 2018 09:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pjpsaGiTI+34hakCFNvbppYPoCxPmRWpsSe2Pz5fp0A=; b=jVOlrhQp6wk3q9cFAYf1EEsNrgvz14JlX0DsDrq2H/ls9QWwmY66UIZVJyXHrUlQJD ia98YI/s5cTKcE4sHAXlpiCXg2jsojcdeTsFsroD3piRs3Nip6fM9b/XYtGCZDNR+pTn CTSHT4QCsJ7n+EgfG4Y2Ve7c8LF0EQjy/YQjVKTCQtynWBtlJVD0i/jrOEK7fXRPeHR5 D0i4z4ZJEDOt6Y4k/xdwVHDivjT9hwQCGSLXGg6SZjp1EWaNf6GP3v1VpfQItsmAvUXD BjCp1bfJ5i6UGmdo76iwxF4ykk8gROKxFtY3xZsx/jq6sGLwJio0NCzNyNZ+dszxkyi2 8lcA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=pjpsaGiTI+34hakCFNvbppYPoCxPmRWpsSe2Pz5fp0A=; b=Whq/iKDIIUVFVWVQXQ1+G6CDlY14/hnYdX94X9uNPv6qDhNtI/da4NCQ5EKQtt+Vf1 miK4oX9ycWJhLVckzX5/vL3NpQSVAGrl8r5aMwf5Wy+W9WOudHP7fc/9cnD2BDaDjZbE lwJSTTkcYn8YesEqKrBq93+CiVwpyTQUsLkJs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=pjpsaGiTI+34hakCFNvbppYPoCxPmRWpsSe2Pz5fp0A=; b=fh0DKz9NFfHvRLRR9+lMNem5RE6mKE0KrUYievWthi4c/wKm+nVVw3HOwwHPCcSMzV 6ruzkThFKPicmeZYE9Hm/7y5VywrnFrSCJTRCrg0GNomkiwIpW4O9L9oI2qX+stFXblS b3ioVXLVPY+R2Cq34cQt5fFPpwabuGJQ4ZErzhr45em3cLjlC8wK/wjMQ/+LjhvIp96o uvm8WBW0Hn435f3NehCi0IyFAKlplCfJ7jPPD/qd15tdczZlTfOtkJhzLbXS9SZcV6Ub lq+Gf8XMTTB3OBhBOFv8S1vjUB45nBy+R2vkdsUdsON4Ms3q7/vZ5zcY7AzwTrrsygZm /sCQ== X-Gm-Message-State: ALKqPwcy3V6XU9xV5qNdc9cX18o98SH3DYmmFbG01lTPlwJXxJP/Mi9W txLveVUvECYrxj0JdomTOaCayQUAH2jXTFcaB0QkpA== X-Received: by 2002:ab0:5a72:: with SMTP id m47-v6mr2070691uad.37.1527698516821; Wed, 30 May 2018 09:41:56 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:3052:0:0:0:0:0 with HTTP; Wed, 30 May 2018 09:41:55 -0700 (PDT) In-Reply-To: <20180530163644.GW6920@sirena.org.uk> References: <20180530093701.GD6920@sirena.org.uk> <20180530150241.GO6920@sirena.org.uk> <20180530154849.GQ6920@sirena.org.uk> <20180530160744.GS6920@sirena.org.uk> <20180530161311.GT6920@sirena.org.uk> <20180530163644.GW6920@sirena.org.uk> From: Doug Anderson Date: Wed, 30 May 2018 09:41:55 -0700 X-Google-Sender-Auth: 46KqakbkYK-6UlKdR-5C6gGm3f8 Message-ID: Subject: Re: [PATCH v3 1/2] regulator: dt-bindings: add QCOM RPMh regulator bindings To: Mark Brown Cc: David Collins , Liam Girdwood , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, Linux ARM , devicetree@vger.kernel.org, LKML , Rajendra Nayak , Stephen Boyd Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wed, May 30, 2018 at 9:36 AM, Mark Brown wrote: > On Wed, May 30, 2018 at 09:31:55AM -0700, Doug Anderson wrote: >> On Wed, May 30, 2018 at 9:13 AM, Mark Brown wrote: > >> > If we're just going to use the most recently set voltage then hopefully >> > the hardware already knew that, and it might not be the lowest available >> > voltage if the last consumer to get turned off was holding the voltage >> > higher. > >> To circle back to the original point: the problem is that (IMHO) the >> hardware is doing the wrong thing by still counting Linux's vote for a >> voltage even though Linux also voted that the regulator should be >> disabled. So basically we're working around the hardware by >> pretending to vote for a dummy lower voltage whenever Linux wants the >> regulator disabled. From Linux's point of view everything works as >> normal--we just tell the hardware a falsehood so it doesn't count our >> vote for a voltage while the regulator is disabled. > > Yeah, and I don't think that's unreasonable for the core to do - just > drop the voltage to the constraint minimum after it has turned off the > regulator, then recheck and raise if needed before it enables again. Would it do this for all regulators, though? Most regulators are hooked up over a slow i2c bus, so that means that every regulator disable would now do an extra i2c transfer even though for all regulators (other than RPMh) the voltage of a regulator doesn't matter when it's been "disabled' (from Linux's point of view). Hrmmm, I suppose maybe it'd be OK though because for most regulators we'd use "regcache" and most regulators that we enabled/disable a lot are not expected to change voltage in Linux (so the regcache write would hopefully be a noop), so maybe it wouldn't be _that_ inefficient... -Doug