Received: by 10.192.165.148 with SMTP id m20csp5381226imm; Tue, 1 May 2018 14:03:55 -0700 (PDT) X-Google-Smtp-Source: AB8JxZouMf7N3xzBQWOgh8kCDkxUVzOkbcMRTrdP89x3jTpYZO7xmcqWgi55zT/a2gtLik6IuEJB X-Received: by 2002:a63:a50a:: with SMTP id n10-v6mr14313390pgf.141.1525208635894; Tue, 01 May 2018 14:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525208635; cv=none; d=google.com; s=arc-20160816; b=ulo8DjZkmwoGXfEFfDBaB3qEzZXXqgOnq46apmg+aKkFWlhKoJUGIEijpzsmt/+q9g obupEU9CreajT/BnKUmeAyPav/AuvZyNq/kxsF3gSM5C3OErM8O8SPfFP6BgifqtMgT+ 5dmuv623BBi41i4fiMwEfINFtT/O3J3VjT+xZ5sFiWEVbjcQRLKQYLEur3EqgcwqVZKu mnJsjtxwKyjGVGd/aIrAGe01m07x11WJbQsF97kwbnT1EhjnWJhCQ7lvz4RK8oaC/DbW hvo5uGLnrQEKqkx+4BXRkZQIDgT/9wpYKeS0j9n5+qp2dxl3UijPo4Qu45mSJlsm8Dnr QXZw== 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=DrYwYGgtd51LTE44PWX/ovqpv2RNHUfixPD0aLqjrWI=; b=jRnM+YO/N9CB1fdiAW87R/HgBImISwukAvPvuYwdrt7K5hobciFR0P3fqP0hXMDv/H uaAVNmxPoAJnVPN3timOppBPRIOitPFyrL5Tx/Bd8OxnODYjO5Vbh9QXZO69VueGSu6W YwsMy4mpBb/NtsO3CiK85R7WFP/kgX6sn9HGZ2ArKRplIi2evi5sta6raNidfZ3X+AuR cXt37luQKztU5d+/30qvn6uM+bkhEnHOnahuYyxsBHxP5qC+c8Q0tKiekpV2X57k14qP dATm4LjLGDgHyp/orFLLClEhLWHGPf6N1ggX/asIwTTsnT4IgIJmVGZSGHJdNo7hvf+v Qxlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=HYKvgy/0; 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 r129si10281879pfc.202.2018.05.01.14.03.39; Tue, 01 May 2018 14:03:55 -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=HYKvgy/0; 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 S1751348AbeEAVDK (ORCPT + 99 others); Tue, 1 May 2018 17:03:10 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:40242 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751161AbeEAVDI (ORCPT ); Tue, 1 May 2018 17:03:08 -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=DrYwYGgtd51LTE44PWX/ovqpv2RNHUfixPD0aLqjrWI=; b=HYKvgy/0VhMnsC6ffILPSfUt+ aToODCjII2LbzvL20vEf/Ol/xOfC3teMNvxopaYR1BAIDiGHW50WuWI0MG3lHmK70fxJCbfq8AwQd /vT4iM5QMymakiSPuYsqzYWG5LRavvlpJ9UIrp3Cs/s15KvTO4aye39XR3CA0k7yS7pbg=; Received: from [211.55.52.17] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1fDcQP-0001NA-Jn; Tue, 01 May 2018 21:03:02 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 6713144007A; Tue, 1 May 2018 22:02:58 +0100 (BST) Date: Wed, 2 May 2018 06:02:58 +0900 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: <20180501210258.GG2714@sirena.org.uk> References: <4b45f41996ea3344340e44fab2dc9e487572e209.1523673467.git.collinsd@codeaurora.org> <4e3353fe-ebb5-46bb-aa58-49ad04c4d9db@codeaurora.org> <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org> <20180424174507.GI22073@sirena.org.uk> <20a8f736-2687-f14f-eaa1-2b2c06eed629@codeaurora.org> <20180425103136.GB24769@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iAL9S67WQOXgEPD9" Content-Disposition: inline In-Reply-To: X-Cookie: Rubber bands have snappy endings! User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --iAL9S67WQOXgEPD9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 25, 2018 at 02:04:56PM -0700, David Collins wrote: > > Using -EAGAIN for "I can't ever read the configuration from this > > regulator" doesn't seem right - it's not like any number of retries > > will ever manage to read the value back. > In this case, the _regulator_get_voltage() call can succeed, but only > after a voltage is explicitly requested from the framework side. The ... > Do you still have reservations about using -EAGAIN for this purpose? If > so, which error code would you suggest using? Yes, that's clearly a problem - -EAGAIN is more for situations where you can just immediately retry like signal interruptions. If the caller repetedly sits and tries to read the voltage it'll never succeed unless something else comes along and sets something. --iAL9S67WQOXgEPD9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlro1gEACgkQJNaLcl1U h9BGTQf8D2BYeALtbrEIcuMc/85tjolOzrgVsLBNiv0aNRFbRasEaxXKT8H/rLrs s4tWN/IWo6XGvvyuOum/AdBrQZQj8ds+bIjY/RqSwnrZo2ao/zB4aOmpcJUeNl5I mivV6GJCDiAVmyCnmadAs4Rw2pCtPwIx00lYwxE/Gs34OT6gMBo+PZsMIO3aiUwi QyH7vAgdAL9rphGa7QL6AYI01/SKZDzE6UvVYJYtX/6vrtPZG315N4PiMT+/wcqs XrQ1Yka8uyErp/wPOW30zlJc1O4rPw1CiktxDqnNlI2BLdpsdoLDNDfim31lNw7i PyAoFSHGC/7OAJ8sSl8TwFAAhYg47g== =KPy2 -----END PGP SIGNATURE----- --iAL9S67WQOXgEPD9--