From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756495AbbCCONt (ORCPT ); Tue, 3 Mar 2015 09:13:49 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:33924 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756224AbbCCONs (ORCPT ); Tue, 3 Mar 2015 09:13:48 -0500 Date: Tue, 3 Mar 2015 14:13:21 +0000 From: Mark Brown To: Bjorn Andersson Cc: Ian Campbell , Kumar Gala , Lee Jones , Liam Girdwood , Mark Rutland , Pawel Moll , Rob Herring , Stephen Boyd , Andy Gross , Chanwoo Choi , Krzysztof Kozlowski , Srinivas Kandagatla , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Message-ID: <20150303141321.GQ21293@sirena.org.uk> References: <1425356740-26285-1-git-send-email-bjorn.andersson@sonymobile.com> <1425356740-26285-4-git-send-email-bjorn.andersson@sonymobile.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="5tnu7VSDgXc9ikuK" Content-Disposition: inline In-Reply-To: <1425356740-26285-4-git-send-email-bjorn.andersson@sonymobile.com> X-Cookie: My LESLIE GORE record is BROKEN ... User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 3/4] regulator: qcom: Refactor of-parsing code 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 --5tnu7VSDgXc9ikuK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 02, 2015 at 08:25:39PM -0800, Bjorn Andersson wrote: > + if ((vreg->parts->uV.mask || vreg->parts->mV.mask) && > + (!initdata->constraints.min_uV || !initdata->constraints.max_uV)) { > + dev_err(&pdev->dev, "no voltage specified for regulator\n"); > + return -EINVAL; > + } OK, so it looks like we're using it because we can't read the initial hardware state - can we introduce a specific interface for that perhaps? A call to query the current constraints might do it. Or possibly just change your earlier patch to make sure the constraints are marked const would do it, reading them isn't the problem that modifying them is. I might've missed some other usage somewhere though. --5tnu7VSDgXc9ikuK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU9cGAAAoJECTWi3JdVIfQqPMH/1MW//txR1gZQ2urDGVno1/Y c56+nkBe99AyV7efubfMvDh0irWWdDH47vA/KaOZuIU8NVZnOPGz+PGtKBR7/lxj ZuwhX/zGC27RSQvFZmO0p9BcjdZUzGgSSmiEqWeqw/eZFbyiCfJsVKvPuGbQg1va ue0iYRWcQR6WGwjM9jbDHvDCEMbcyVe0605FOW/+9cEwYCehZOy7i4LnpjreovFp K57zMo9ytc6mfFxPV5InyQFM5w8OVTVbD0DoHKx6jkra1e3iRbO/bN7CcSQ0wMQx D3b9R38drxGtcHnzEiRmhhE9uOq8JDrI2CAK6sfGv4PrIctkZu8XLozpCE4SQHs= =Gq5G -----END PGP SIGNATURE----- --5tnu7VSDgXc9ikuK--