Received: by 10.192.165.148 with SMTP id m20csp4934015imm; Tue, 24 Apr 2018 10:46:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqD7l4ZSV9o3brd4HUXkB9NXJ2kgbUwF0UFAK8dQeoOPJV4tqc6ZAM5/JTL7IaJ2yEInPVS X-Received: by 2002:a17:902:7405:: with SMTP id g5-v6mr2930855pll.102.1524591998417; Tue, 24 Apr 2018 10:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524591998; cv=none; d=google.com; s=arc-20160816; b=kBqsais6LS1sIY12D4+xzYf2TED0D0s0hZ1S8tENbAW78AFakaXfVXseqjzZgeoebg rTcBpayu2KQAWJBiSaWbTl+udU2e7seVpFSFCsCiLGZ1xWt979JFha2EY87QdLK8omHf 7GZAB+eP4/rGFbABz9EGwsvfi18Wx63/fDkscmr9E/m54O46NWCSuAq/HN3IXybOn/xS k8e0oDW9Dd95Vs6c3Htby3XV+Ttj54dsTvD4c1Zaax8XX6+5Kn87hoT0EcTXN6tLLUgX VYkXe4YiBcTM9ncm8Z/br4CxovnZ64SDgRZkNei02sdpL7LAUcMcEhGMaPYIs04gPCfp JGxg== 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:dkim-signature:arc-authentication-results; bh=c+rUCQQRj5maZWRfHRKPCyOSFamUgAOpXhmOyp0wNBw=; b=IBjSVg9KjmsWey8O2bFCXxyaTRSawSZbpYd0tRUhyFu1hRr0luDwK0wU/bXrFQc5Fe L1eup21zmM1Dir36YBHZR3AsxpXv5mTgYI9ZSSDWAcz+q0Y7DUde+AmSr6v8wWoKBQcp vFX/lJIHIfW2TNQJimmH6bkcbSlFkjhwwN7WXsLSN3VdlPXk43cQq9ufAs0fbcJ6mR6W WUMRDyKFrYhLZDzV3hTPBRWSOPy73MGtOt0jT6Pjvesi5OKIFn18TC/kx5H2GpXSK2qZ pjIbOStop9tgDAXf1YX4TT9nzx00dgV/1jFA+b3eU/3LDif0atvE0qPnSs4b6trL3oY4 RFnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=GMYUF1qK; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si12048830pgc.438.2018.04.24.10.46.23; Tue, 24 Apr 2018 10:46:38 -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=@sirena.org.uk header.s=20170815-heliosphere header.b=GMYUF1qK; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752485AbeDXRpN (ORCPT + 99 others); Tue, 24 Apr 2018 13:45:13 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:41792 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbeDXRpK (ORCPT ); Tue, 24 Apr 2018 13:45:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=c+rUCQQRj5maZWRfHRKPCyOSFamUgAOpXhmOyp0wNBw=; b=GMYUF1qKDsAZlkzCad/+kgrNi Y9NpKgO9LQxRhD4blmYS0lOmlxHFQfs77iL0FiHBP16EJMH1qdzHBzk/7hFA4ySqWyq7s8nrtDZdQ nagyMZ3OG988f6tRVcjp72zsC7rIjapcq4eVZ4qvX2eCXMc34/Dsae9MGD5DllrW5BWh8=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fB203-0000T5-JG; Tue, 24 Apr 2018 17:45:07 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1fB203-0003Sv-4e; Tue, 24 Apr 2018 18:45:07 +0100 Date: Tue, 24 Apr 2018 18:45:07 +0100 From: Mark Brown To: David Collins Cc: Doug Anderson , Liam Girdwood , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, Linux ARM , devicetree@vger.kernel.org, LKML , Rajendra Nayak , Stephen Boyd , Matthias Kaehlcke Subject: Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver Message-ID: <20180424174507.GI22073@sirena.org.uk> References: <4b45f41996ea3344340e44fab2dc9e487572e209.1523673467.git.collinsd@codeaurora.org> <4e3353fe-ebb5-46bb-aa58-49ad04c4d9db@codeaurora.org> <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gTY1JhLGodeuSBqf" Content-Disposition: inline In-Reply-To: <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org> X-Cookie: Take your Senator to lunch this week. User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gTY1JhLGodeuSBqf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 20, 2018 at 03:08:57PM -0700, David Collins wrote: > On 04/19/2018 09:16 AM, Doug Anderson wrote: > > On Wed, Apr 18, 2018 at 4:30 PM, David Collins wrote: Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material. > > You'd need to ask Mark if he's OK with it, but a option #3 is to add a > > patch to your series fix the regulator framework to try setting the > > voltage if _regulator_get_voltage() fails. Presumably in > > machine_constraints_voltage() you'd now do something like: > >=20 > > int target_min, target_max; > > int current_uV =3D _regulator_get_voltage(rdev); > > if (current_uV < 0) { > > /* Maybe this regulator's hardware can't be read and needs to be in= itted */ > > _regulator_do_set_voltage( > > rdev, rdev->constraints->min_uV, rdev->constraints->min_uV); > > current_uV =3D _regulator_get_voltage(rdev); > > } > > if (current_uV < 0) { > > rdev_err(rdev, > > "failed to get the current voltage(%d)\n", > > current_uV); > > return current_uV; > > } > > If Mark doesn't like that then I guess I'd be OK w/ initting it to 0 > > but this needs to be documented _somewhere_ (unlike for bypass it's > > not obvious, so you need to find someplace to put it). I'd rather not > > hack the DT to deal with our software limitations. > I'm not opposed to your option #3 though it does seem a little hacky and > tailored to the qcom_rpmh-regulator specific case. Note that I think it > would be better to vote for min_uV to max_uV than min_uV to min_uV though. > Mark, what are your thoughts on the best way to handle this situation? I think that's probably only OK if we have a specific error code for the regulator being limited in this way otherwise our error handling for I/O problems involves us trying to reconfigure supplies which seems like it would be risky. =20 --gTY1JhLGodeuSBqf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlrfbSIACgkQJNaLcl1U h9C9WAf/SZljCZJDKB4bLgbVYGBdwEaqqJMWz4oNgio8hF/RR5NeyKDZ8vnlfoLV JwTzMO3F9m2tLinAzq8c9jc6dRLqTn3SBaWOolg5syXustWlVbchf2+Gjjgo4JDM VNMYmsDc7UMxMmUnzo1/fBDgTaBC5P3xb/HVTFGV4cktSKOea4tPg6L2JAmDpVL3 /CNf61gKBsKZcJeekPUosVGIeVfyRx+5CWGSHSZ/gdVmy+muKUvT1n6U5Ya1Y31Y Mz/DJq3+bM/6HwUg5ym/0h1VRq8kZO4MTb/j0Jsr+v+3A7cMaVXaxMM/4weV0sww blXiNiQT73dqtrJh5I0lGZt1v5Hclg== =Quty -----END PGP SIGNATURE----- --gTY1JhLGodeuSBqf--