From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbbJBRdK (ORCPT ); Fri, 2 Oct 2015 13:33:10 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:35994 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751979AbbJBRdI (ORCPT ); Fri, 2 Oct 2015 13:33:08 -0400 Date: Fri, 2 Oct 2015 18:32:56 +0100 From: Mark Brown To: Sascha Hauer Cc: linux-kernel@vger.kernel.org, Liam Girdwood , kernel@pengutronix.de, linux-arm-kernel@lists.infradead.org Message-ID: <20151002173256.GZ12635@sirena.org.uk> References: <1443621946-8712-1-git-send-email-s.hauer@pengutronix.de> <1443621946-8712-5-git-send-email-s.hauer@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vM12nk/63StVgfqY" Content-Disposition: inline In-Reply-To: <1443621946-8712-5-git-send-email-s.hauer@pengutronix.de> X-Cookie: Walk softly and carry a megawatt laser. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 2a01:348:6:8808:7e7a:91ff:fede:4a45 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 4/6] regulator: core: Propagate voltage changes to supply regulators 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 --vM12nk/63StVgfqY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 30, 2015 at 04:05:44PM +0200, Sascha Hauer wrote: > A new min_dropout_uv field is added to struct regulator_desc. Regulators > can specify the minimun dropout voltage they need for proper function > here. Now when the voltage is changed on a regulator the regulator core > makes sure that Can we have this interface addition as a separate patch please? Makes it easier to add to other devices. I could've sworn I'd already done that bit but obviously never got the patch mailed out. One change I think we need here is only doing the propagation if either the device lacks a set_voltage() operation (in which case it's just a switch passing through the parent voltage) or we have a dropout voltage, otherwise we'll try to set the exact voltage the regulator is supposed to output and that'll most likely end in tears. Otherwise this is making sense to me. > Calculating the optimum voltage for the supply regulator is a bit tricky > since the simple approach of just adding the desired minimum voltage and > the minimum dropout is not enough. It may happen that the current > regulator does not support the desired minimum voltage, but only a > higher one. This means we have to figure out the lowest voltage > supported by the regulator that is higher than the minimum desired > voltage. The regulator_get_voltage_floor introduced with this patch does > exactly that. Yeah, split out the calcuate and the set. Thanks for working on this! --vM12nk/63StVgfqY Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEbBAEBCAAGBQJWDr/HAAoJECTWi3JdVIfQz0cH+MapB94ZHOYomq8crhLkFn9G NcWvUoyUtug08wHcJgBBhq0VjajQeJN68NnmLPeLz0QXYlzy2dGHCzPi/C19zYNy LgLzqRy/Bw2ULAmgKS3lofCWjegRUjasrGNQZoa80wf6tsPhsdqJd1qG9FKetGNB OlKPn3d867U3dJxTFUL4qrHo2wVsHcjLzx9b7ci/fLARNB+Lums9AnP6VT9ER10x O9AA+W39/jFYj1mNXA6EWMb6uovkroKqbz8SWcII7mX1hyE5Bn1fU97sR7R8HVuO H5FXX/W9yAEs3pgIVkbfkztxhg2cgysEJxgcBSX/YxdwDzgl+WukckJ5RoHacA== =mR5D -----END PGP SIGNATURE----- --vM12nk/63StVgfqY--