From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752397AbcGOMuv (ORCPT ); Fri, 15 Jul 2016 08:50:51 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:48304 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751032AbcGOMut (ORCPT ); Fri, 15 Jul 2016 08:50:49 -0400 Date: Fri, 15 Jul 2016 13:50:39 +0100 From: Mark Brown To: Jisheng Zhang Cc: Liam Girdwood , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-ID: <20160715125039.GI30372@sirena.org.uk> References: <20160715200113.0f3cd823@xhacker> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hABqaeELJqnDDeDE" Content-Disposition: inline In-Reply-To: <20160715200113.0f3cd823@xhacker> X-Cookie: It's later than you think. User-Agent: Mutt/1.6.0 (2016-04-01) X-SA-Exim-Connect-IP: 2a01:348:6:8808:fab::3 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: "coupled" regulator support X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hABqaeELJqnDDeDE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jul 15, 2016 at 08:01:13PM +0800, Jisheng Zhang wrote: > regR can only be set to v1 if devA and devB all call for set voltage to v1 > regR can set to v2 if devA or devB call for set voltage to v2 > To support this situation, I'd like to add flag to regulator structure and > patch regulator_check_consumers() to check whether we are safe to set the vol Surely this is just what normal set voltage calls do? If devA says set_voltage(v1, v2) but devB still has set_voltage(v2, v2) then we will leave the voltage at v2, we'll only allow it to be set to v1 if both consumers agree that this is a valid voltage. It feels like there's something else going on here that I'm missing? --hABqaeELJqnDDeDE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXiNweAAoJECTWi3JdVIfQzVIH/j+W3PuSYO9kOuvDYCQV/bGK B1AqpYIDHmc5U0PrSX/HhiSE7Gog1c/BPAKUhdhHiOFlorl3QyCNknDG3Xw4qYAK vW/uwmbLGyAhIB2KusW5MnM8cBXC4g0zvye07fl3gYgiv+6cfUk7pCy8FlAf41r3 vguEj2oNG2pCO4yXfDeRntBKRbj9mPh4BifVlOD19ovXDmGgxx7W+MDOMI2r9PZB PcTFFMe/PP1Fj/f/taK3gOa9/eJTjC36ri2Nb+GAJ/tr8gno7so01D59m6CjXK8a lId7BhDxKKUKMVWUC9MUlj8w4t5t8CK+4AH5gIGh+UFZ72v28lFPZ/Rc6Zbn4Q0= =Qb5Z -----END PGP SIGNATURE----- --hABqaeELJqnDDeDE-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: broonie@kernel.org (Mark Brown) Date: Fri, 15 Jul 2016 13:50:39 +0100 Subject: "coupled" regulator support In-Reply-To: <20160715200113.0f3cd823@xhacker> References: <20160715200113.0f3cd823@xhacker> Message-ID: <20160715125039.GI30372@sirena.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Jul 15, 2016 at 08:01:13PM +0800, Jisheng Zhang wrote: > regR can only be set to v1 if devA and devB all call for set voltage to v1 > regR can set to v2 if devA or devB call for set voltage to v2 > To support this situation, I'd like to add flag to regulator structure and > patch regulator_check_consumers() to check whether we are safe to set the vol Surely this is just what normal set voltage calls do? If devA says set_voltage(v1, v2) but devB still has set_voltage(v2, v2) then we will leave the voltage at v2, we'll only allow it to be set to v1 if both consumers agree that this is a valid voltage. It feels like there's something else going on here that I'm missing? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: not available URL: