Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1006696imm; Wed, 23 May 2018 08:51:02 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp/teOFdAAHaiD3YWcofQl/vqVYo92SGCwu2ozhWxtGaSnuCrtsdACF0tAllrHRdYj7Jo+S X-Received: by 2002:a65:62c5:: with SMTP id m5-v6mr2785707pgv.13.1527090662884; Wed, 23 May 2018 08:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527090662; cv=none; d=google.com; s=arc-20160816; b=dFAQKIoZIlkGG8K0IYky4GeaBz4FgpzQoJ2spQ5+BvrlThooeQ74E3iYD82DVDv39h c436aWh+SMH/gSjW5qk+BKxFHwA77LciFxYc9mvG9gBNg9oyQI0JXG8xAFZnBnL7HVVw ecogw+3RbiAglNu/Ndkz+6Q9mX8LgUVJOIDAOg6MAq+Mnwx13S0y3Dfj8/rYL5pAmQVz 0Be78gTaLGoH8X8HwGfgjL3ZHP5Y12RuZ5PhAwoyl4WxLzxYbkbbXnEJK+xhzF57BYTL Q2Uhmlyd++GKSS1t71ON7yyL+aey3WQwPi6RMsJFMJjiBklLAkkhWH67yajzJNrgseob oegA== 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=0pI6wK4WWwAljWt3D42zRIHVhX1+2uQGxZf/OvfzaGM=; b=yy4riTCb8S0F2wF8hDWFiN2Pz36RkQThMlhElZLltp4eig5BcuKppBV5ujlnIpZpmI 6gFfN3sr3z1SFdX3rRZ0/vKHef5dFj01LAFFcu6PeN7NIZU8GNTYEhB56IaHoVpTNpH6 vw9oi1vRSUTcDmELtM4tbE9F8DqC+7mc3JEhrOWMLXY9LoPqVs2EHoPkmePAe6eoAcHS m3Hfl9W9yWsfYG1zAnaHQcCN2jMKjIBqByLp+M+jzJ+/8eoRtwP7cQ8u722EehOpkfZU ZPvmDnYnZlUMiC48f4Ht2223RFd10em/FBh+rQx6B/ELkT9yBVQo8r1v4mpKM3QA5HBs GhHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=vdO4NBLR; dkim=fail header.i=@chromium.org header.s=google header.b=KbUW0//Q; 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 u81-v6si19300677pfg.289.2018.05.23.08.50.47; Wed, 23 May 2018 08:51:02 -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=vdO4NBLR; dkim=fail header.i=@chromium.org header.s=google header.b=KbUW0//Q; 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 S1754664AbeEWPue (ORCPT + 99 others); Wed, 23 May 2018 11:50:34 -0400 Received: from mail-ua0-f195.google.com ([209.85.217.195]:42606 "EHLO mail-ua0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754618AbeEWPuY (ORCPT ); Wed, 23 May 2018 11:50:24 -0400 Received: by mail-ua0-f195.google.com with SMTP id f3-v6so15052429uan.9 for ; Wed, 23 May 2018 08:50:24 -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=0pI6wK4WWwAljWt3D42zRIHVhX1+2uQGxZf/OvfzaGM=; b=vdO4NBLR3WqSfwvB3QZwx3hbmzdglGG3R+qVKzwlH67rHbmwNhJrYtxy15TEj8ltjy b4fzKtGlp1hXTrL/bjyGBiGsf6kKKL35qWf03SmBY2CsTNMNtw58rMPZyWrnSZw648oW TOE2wEhubQm7K8gfpgk9wTXGra6Fl4Uju/BQaGwkhhMzq/iRk1639Q3QNL0D2APgyl/g sZnEWMsyeXc4D1dxLuL2PdnVKodhRdg7W3kaVfmG4VHXHHWSTVPyoBJI5PF8K56OEY53 6GQt8c795n3h670siILL8fZ9/QvM9bOhH8NJG664/LB1nD9e3+/n1qkmxLE3K4nyhi9h J0gw== 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=0pI6wK4WWwAljWt3D42zRIHVhX1+2uQGxZf/OvfzaGM=; b=KbUW0//QWS5Q/s4bqDigRRINd/xw+xa1/suAi7pFbpzl5x40z5RIt+6JpfTge/glwS RDcukFrKnN+OBTpDQugp7SPsNPxhTad8E8Hz7zfsVLGX4hQi9ZgiHiS1qL40XEG+vztl 7qSDOlPSn8JdzMiP48GMJha8V60v6kQgvCsA8= 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=0pI6wK4WWwAljWt3D42zRIHVhX1+2uQGxZf/OvfzaGM=; b=RQ5BPg/z/lb2oOohSHI6ZHh10Q4Wm16HaTQ34nSjsGdsTEb+ALzGMmvdmXrerijEtm KA0bDV1cuqjR00M4U3xsuYgCimOtqO+PyM9x7m5sm6RDddQ4iCjZX89EBpCThJGHPdJg arySeKgefbJ/g6YetTvTDLdof+YrKxuNwvfVd/imJE4oEyY/1w3vxBdEBKrnncIdK/37 Mi5EHfPol9KA7qU9bQYkLcoD6C/Me5rkvHkafbRvmhPNVxME7w/VnaR5MQtEl5B7EHc8 D2FdyAONXfAHT1ROBgmqfZhcl0gf8jheP/jxGja8UeSZQieyHaGzeb8+ZcZq+HAJYqCw tB4g== X-Gm-Message-State: ALKqPwcS9ma093YwaqCePD8nhNhYHWNJDS8Dz5TLSmerqpkL2fFBI1B1 kL49mzoQHBCmrXBZmzy8J0XAWGt64tHcitv3ZYA3UA== X-Received: by 2002:ab0:504:: with SMTP id 4-v6mr2234658uax.135.1527090623166; Wed, 23 May 2018 08:50:23 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:3052:0:0:0:0:0 with HTTP; Wed, 23 May 2018 08:50:22 -0700 (PDT) In-Reply-To: <20180523154057.GL4828@sirena.org.uk> References: <869aad59-1cc5-28ef-1fb5-4ef846696c40@codeaurora.org> <20180523082908.GB4828@sirena.org.uk> <20180523154057.GL4828@sirena.org.uk> From: Doug Anderson Date: Wed, 23 May 2018 08:50:22 -0700 X-Google-Sender-Auth: Vrcd4dCnFhmS1S8povlhXNc6r38 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 23, 2018 at 8:40 AM, Mark Brown wrote: > On Wed, May 23, 2018 at 08:23:22AM -0700, Doug Anderson wrote: >> Hi, >> >> On Wed, May 23, 2018 at 1:29 AM, Mark Brown wrote: >> >> > It's arguable either way - you could say that the client gets to specify >> > a safe range at all times or you could say that the machine constraints >> > should cover all cases where the hardware is idling. Of course RPMh >> > is missing anything like the machine constraints (as we can see from all >> > the fixing up of undesirable hard coding we have to do) so it's kind of >> > pushed towards the first case. > >> OK, fair enough. If others all agree that it's OK to make requests >> about the voltage of a disabled regulator then I won't stand in the >> way. I guess it does call into question the whole idea of caching / >> not sending the voltage until the first enable because it means >> there's no way for the client to use this feature until they've >> enabled / disabled the regulator once. If you think of it as invalid >> to adjust the voltage of a disabled regulator then the caching >> argument is super clean, but once you say that you should normally be > > It's got to be valid to think about the voltage of a disabled regulator > since drivers want to be able make sure that the regulator gets enabled > with a sensible config. With most hardware this is really easy since > you can just look at the status reported by the hardware but the RPM > makes this hard since there's so much write only stuff in there. I should be more clear. Certainly it should be valid to set the voltage before enabling it so, as you said, the regulator turns on at the right voltage. I'm saying that it's weird (to me) to expect that setting the voltage for a regulator that a client thinks is disabled will affect any real voltages in the system until the regulator is enabled. In RPMh apparently setting a voltage of a regulator you think is disabled can affect the regulator output if another client (unbeknownst to you) happens to have it enabled.