From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751777AbcGRSF1 (ORCPT ); Mon, 18 Jul 2016 14:05:27 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:58808 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbcGRSFY (ORCPT ); Mon, 18 Jul 2016 14:05:24 -0400 Date: Mon, 18 Jul 2016 19:05:08 +0100 From: Mark Brown To: Jisheng Zhang Cc: Liam Girdwood , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Message-ID: <20160718180508.GV30372@sirena.org.uk> References: <20160715200113.0f3cd823@xhacker> <20160715125039.GI30372@sirena.org.uk> <20160718144422.30be1e2f@xhacker> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7XuS4gr/+Xj300Yp" Content-Disposition: inline In-Reply-To: <20160718144422.30be1e2f@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 --7XuS4gr/+Xj300Yp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jul 18, 2016 at 02:44:22PM +0800, Jisheng Zhang wrote: > v1 and v2 and both valid voltages, but here we have an explicit limitation: > we must take the "regulator shared" fact into consideration. Let's assume > the voltage is at v2, devA is not busy now, it wants to scale down freq, then > scale down voltage to v1, but if devB hasn't call for setting voltage to > v1, we can't scale down voltage now, we need to wait for devB sending out > the voltage scaling down request when it is not busy in future some time. > Obviously, the last user will succeed to scale down the voltage. > My solution is > to extend regulator_check_consumers() to check whether all consumers agree > to scaling down voltage or not. I'm not sure I 100% follow your explanation above - it still sounds like a normal shared regulator situation. In general I'm really unsure how this sort of scheme is expected to work. It seems like in a lot of cases there will be some other constraints in play (like needing to do frequency updates as part of the sequence) which can't be handled purely in the regulator API and/or that the DVFS driver ought to be able to use notifiers to discover when actual changes have happened and handle things in their own code. But like I say I don't 100% follow what's new in your example so I may be missing something. --7XuS4gr/+Xj300Yp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXjRpTAAoJECTWi3JdVIfQYmQH/Aiivi1FzD6PORSFQZdMNPP4 N6CPyunh85tyvv15rZD99pIXnnjIvVki4XVa3u68NUMlACBZgEY+OAkeGzmNyIPi +JVAx0OQOflrWfdlIi/UIJKzWDeFGoThVjct9mTZ4Vco76UESTH8MV/bbJGZ0EAO 25Ao4n4JviWbgmgVrZ8WmVxBIkGgXUq0/1z7u8d6/QtrTnyw1pAHixRiZml2b62Q /6AzwA3XkU3YJvCW/hypsmdCq049xjk+PfhmmSsZbP8siw2hVBp8Nc5ytj3SyEz3 EvRFZsvvnFw4ljqGYuARQJnyuTArqkj5U8KczNhGP6GXFmMiAy4y57cTyCNKlFg= =FOUG -----END PGP SIGNATURE----- --7XuS4gr/+Xj300Yp--