Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4605874imm; Wed, 30 May 2018 08:35:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ/DxcViPo28dAzpM16FrlRv0KIinpIzgksy2U2iWWPegIpEU8AZ+xhWiED56oS6V6iF5XV X-Received: by 2002:aa7:8254:: with SMTP id e20-v6mr3260477pfn.140.1527694534008; Wed, 30 May 2018 08:35:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527694533; cv=none; d=google.com; s=arc-20160816; b=klDKWDZMbKeCgD3rQbgGMj/8w+JOXtvC6fKtzJ9S1+jedq/l2SBKRPXUOLy9jiMczt JDG6S+w0IAXzuLCmweKIq1xIKWNLo0LM8JZhrfOP4sIoN15+9Rlkjx2kMNeB3u4q3lUB MTpt5EVrOEe6j2EYDFP34IBj6A/viHzUbDglgBDJOzE81Mdmt9SAY94QnotFSKA3EIMV 48h2/mM7DJ+SYyHBvws6OjMqwmvz7MFdoL2IfiLdfdL7elz+fRLTsTMBn+mcMmTjF631 CSWqFj/yi0WpLmdJ9dbjA7NutjnCKeFOyAINBXCfVEpfZY6htOlbEo9i1MYgjo7QO+8A Xj9Q== 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=XvcNtyTVX5G+Po6ie3MgCOJUoz7S5eSksHWkFfsVkEM=; b=okHkuTX4j3GtWBZqqIutTCwBtnIYXDtyx8AY3aipe2AIpi5AlEFeFVv1/OScLrb8IH aJZsDnXk6WBItdDahz+uBJg0A3coSlqx68HGIvSX3ECrjFjhxdsrFiK0bnIdMyzodbtF rJxy52o2Ut8/ow6XrXMWTz5xn0WVBZOi5s7rOvkx6meNQd3qQAF/Sy5EJfIOt07X8hHo iV++utmldvVY5dXCGgsvMrLcQIRntg/kB7yl8EdKlILM8Ungm4p84losiK+3kr2b9jxG 44phc4dAeHnWXjRxMYaO5nJKO3g9WG0+3zkMjpzcOiZjshChNdhnVv1+uQ1Gic70r8Uv fVPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@google.com header.s=20161025 header.b=TtSmRxD8; dkim=fail header.i=@chromium.org header.s=google header.b=bwrhQ2r4; 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 x4-v6si33364042pfm.110.2018.05.30.08.35.19; Wed, 30 May 2018 08:35:33 -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=TtSmRxD8; dkim=fail header.i=@chromium.org header.s=google header.b=bwrhQ2r4; 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 S1753483AbeE3Pe4 (ORCPT + 99 others); Wed, 30 May 2018 11:34:56 -0400 Received: from mail-vk0-f67.google.com ([209.85.213.67]:46479 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbeE3Pex (ORCPT ); Wed, 30 May 2018 11:34:53 -0400 Received: by mail-vk0-f67.google.com with SMTP id i190-v6so11360903vkd.13 for ; Wed, 30 May 2018 08:34:53 -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=XvcNtyTVX5G+Po6ie3MgCOJUoz7S5eSksHWkFfsVkEM=; b=TtSmRxD8yFu4/bEPvv9b+BKEDGHY9boM1YS5pmeW8okRlZwOXYOmqjiDAGqK/RMg7M rSEoP/Khz3/P+D4A0pzvvPdA6O3U+pCZunR0vKwjNGHwfBi6+Yqt81zkWiTwZ0FIhGpH zKdqoQLpavmVMd379eIE6l7j5tI+LmFl1Gitp0/fiRsJQXIxwLa70cp6MNVuzekkKTDK 9oqeVz/0IW8AlYcqr/Dek5eJwHpvBOfHIhqumjrHibFT3mPX+sZKk6xcXPF9sNohKmyy Fb0euzRC1Golpl3qMVietJRhoF/qR7G28dwRQ+/kOczRFqPLlMTKh0CsfB/ue20Yr+wY Bpvg== 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=XvcNtyTVX5G+Po6ie3MgCOJUoz7S5eSksHWkFfsVkEM=; b=bwrhQ2r4cTZfCxj4MHEpI/855DfW2PMg/kVcoWx1Ksw9vKMHdeNciNhHPpym1bevh/ MGuBeQN/RYJScjRob81GiYXxJAsRgLrYswGh4JINbu6ZMY6dJw7BXvVDtSyewonO7OEg CI/UkxkN8RQX3MBEyeu6Jaou9Ch/SfDXtyefI= 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=XvcNtyTVX5G+Po6ie3MgCOJUoz7S5eSksHWkFfsVkEM=; b=rDeYYxitEnp7fmYsSkD7zq/uYRIglbNY1yFPVdgzX5xCi2+/ZtBBlPP4alX1oLdmQ4 djY4RYPReE3mMTPnM9Cjbwwh/ewNIaPQr0WkmQkGz/ghqwwlh0VSJ2VmTWFtbCwhnKn/ SdbXYiGrJlJ8tv/QLssGrzcsMyVN+qF3Lne1EmldRix4Cm9hm/gfIoacfXeeNhNeMaKZ OzECAD/l7Pmd9X2doRsxnbNUaKIqjQA7eVOfbx0JrAk1mpWKzEHqh2g/BB2xcqiVqxOm AXfL6xT0Jk2C2zJuYhW0lIhlD8Abqzo/NoVWsGabeusu91SFqVgkk30v7G7rNrfF0Ha4 HsZA== X-Gm-Message-State: ALKqPweJEvRD3oKA6PBHZzBA2W2CXY2otLQzDG7yIeUWuATeSYdI3efL JrIoU4hUDQpmVgPwlJMx5nYhCMUtd/UZo/Rh1xvQiQ== X-Received: by 2002:a1f:3a15:: with SMTP id h21-v6mr1845727vka.93.1527694492148; Wed, 30 May 2018 08:34:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a1f:3052:0:0:0:0:0 with HTTP; Wed, 30 May 2018 08:34:50 -0700 (PDT) In-Reply-To: <20180530150241.GO6920@sirena.org.uk> References: <20180523082908.GB4828@sirena.org.uk> <20180523154057.GL4828@sirena.org.uk> <20180523155617.GN4828@sirena.org.uk> <20180530093701.GD6920@sirena.org.uk> <20180530150241.GO6920@sirena.org.uk> From: Doug Anderson Date: Wed, 30 May 2018 08:34:50 -0700 X-Google-Sender-Auth: Vny9-bg1QiAogzibPECfC-W_tHA 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 8:02 AM, Mark Brown wrote: > On Wed, May 30, 2018 at 07:46:50AM -0700, Doug Anderson wrote: >> On Wed, May 30, 2018 at 2:37 AM, Mark Brown wrote: > >> >> Linux vote for the lowest voltage it's comfortable with. Linux keeps >> >> track of the true voltage that the driver wants and will always change >> >> its vote back to that before enabling. Thus (assuming Linux is OK >> >> with 1.2 V - 1.4 V for a rail): > >> > That's pretty much what it should do anyway with normally designed >> > hardware. > >> I guess the question is: do we insist that the driver include this >> workaround, or are we OK with letting the hardware behave as the >> hardware does? > > What you're describing sounds like what we should be doing normally, if > we're not doing that we should probably be fixing the core. I'm not convinced that this behavior makes sense to move to the core. On most regulators I'd expect that when the regulator driver says to turn them off that they will output no voltage. The reason RPMh is special is that there's an aggregation outside of Linux. Specifically I like to make it concrete use the example where both Linux and "the modem" make requests for the same regulator and RPMh aggregates these requests. This aggregation happens separately for "enabled" and "voltage". Thus if you consider: Modem: vote for 1.3V and enabled=true Linux: vote for 1.4V and enabled=false The aggregated voltage is 1.4V and the aggregated enabled is true. Said another way: Linux's vote for the voltage affected the state of the rail even though Linux wanted the rail disabled. In any other system when Linux disabled the regulator it wouldn't matter that you left it set at 1.4V. Thus RPMh is special and IMO the workaround belongs there. -Doug