From patchwork Thu Apr 30 10:16:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 21002 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3UAGONQ007371 for ; Thu, 30 Apr 2009 10:16:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751797AbZD3KQW (ORCPT ); Thu, 30 Apr 2009 06:16:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751956AbZD3KQW (ORCPT ); Thu, 30 Apr 2009 06:16:22 -0400 Received: from cassiel.sirena.org.uk ([80.68.93.111]:55709 "EHLO cassiel.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751797AbZD3KQV (ORCPT ); Thu, 30 Apr 2009 06:16:21 -0400 Received: from broonie by cassiel.sirena.org.uk with local (Exim 4.69) (envelope-from ) id 1LzTJT-0004Xt-Q9; Thu, 30 Apr 2009 11:16:19 +0100 Date: Thu, 30 Apr 2009 11:16:19 +0100 From: Mark Brown To: Grazvydas Ignotas Cc: Steve Sakoman , "linux-omap@vger.kernel.org" , David Brownell Subject: Re: Overo broken with current top of tree Message-ID: <20090430101619.GE10190@sirena.org.uk> References: <5e088bd90904290903q1e13afb6g2df13364a7ec0ddf@mail.gmail.com> <6ed0b2680904300231y2afa25a7ge192eb3333d7353b@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6ed0b2680904300231y2afa25a7ge192eb3333d7353b@mail.gmail.com> X-Cookie: Preserve the old, but know the new. User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Scanned: No (on cassiel.sirena.org.uk); SAEximRunCond expanded to false Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On Thu, Apr 30, 2009 at 12:31:47PM +0300, Grazvydas Ignotas wrote: > On Wed, Apr 29, 2009 at 7:03 PM, Steve Sakoman wrote: > > set_machine_constraints: invalid 'VUSB1V5' voltage constraints > I get the same on pandora, although it continues booting fine after > that. Maybe regulator folks will comment about regulator errors. I suspect this may be due to the buggy defaults that are provided when no voltage constraints are given for a fixed voltage regulator. There's a patch on its way to mainline fixing this: commit 14d32bb077f7cc6f78bd012e5b1489899dddf749 Author: Mark Brown Date: Tue Apr 28 11:09:38 2009 +0100 regulator: Fix default constraints for fixed voltage regulators Default voltage constraints were being provided for fixed voltage regulator where board constraints were not provided but these constraints used INT_MIN as the default minimum voltage which is not a valid value since it is less than zero. Use 1uV instead. Also set the default values we set in the constraints themselves since otherwise the max_uV constraint we determine will not be stored in the actual constraint strucutre and will therefore not be used. Signed-off-by: Mark Brown Signed-off-by: Liam Girdwood --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 2f14c16..98c3a74 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -703,10 +703,13 @@ static int set_machine_constraints(struct regulator_dev *rdev, int cmin = constraints->min_uV; int cmax = constraints->max_uV; - /* it's safe to autoconfigure fixed-voltage supplies */ + /* it's safe to autoconfigure fixed-voltage supplies + and the constraints are used by list_voltage. */ if (count == 1 && !cmin) { - cmin = INT_MIN; + cmin = 1; cmax = INT_MAX; + constraints->min_uV = cmin; + constraints->max_uV = cmax; } /* voltage constraints are optional */