Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759953AbbKUNWb (ORCPT ); Sat, 21 Nov 2015 08:22:31 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:42010 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbbKUNWa (ORCPT ); Sat, 21 Nov 2015 08:22:30 -0500 Date: Sat, 21 Nov 2015 13:22:02 +0000 From: Mark Brown To: Saurabh Sengar Cc: lgirdwood@gmail.com, linux-kernel@vger.kernel.org Message-ID: <20151121132202.GE26072@sirena.org.uk> References: <1448006247-4749-1-git-send-email-saurabh.truth@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KlAEzMkarCnErv5Q" Content-Disposition: inline In-Reply-To: <1448006247-4749-1-git-send-email-saurabh.truth@gmail.com> X-Cookie: Your domestic life may be harmonious. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 92.40.248.95 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regulator: of: simplifing the 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 Content-Length: 1906 Lines: 51 --KlAEzMkarCnErv5Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 20, 2015 at 01:27:27PM +0530, Saurabh Sengar wrote: > in case of_property_read_u32 fails, it keeps the parameter unchanged > so no need to test if its success and then assign the value On the other hand the current code doesn't require us to know that detail... it's really not entirely clear to me that this is a great win. > I also have concern related to how we are passing 'regulator-mode' and > 'regulator-initial-mode'. Currently this require a extra function to be > set in 'of_map_mode', which can be avoided. > These two parameters can be set directly from the device tree as in below patch: > https://lkml.org/lkml/2014/1/16/263 No, they can't - the values we set for modes in the DT are defined per regulator and we need to translate these into the regulator API definitions. > + of_property_read_u32(np, "regulator-microvolt-offset", > + &constraints->uV_offset); The indentation for these is very strange - the second line is indented a really long way. --KlAEzMkarCnErv5Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWUG/5AAoJECTWi3JdVIfQc3sH+weuWIsof2C26Hn7Pf2ruwTl bqnoAy3skP0YbIhxwYsWtlYPL5wwThNzMJ5/vTEVYgNsk876YUZmYxj+EjP92Ymx 2OeViIi1c7vAHWvFnMw5jRu0CIHzosupdskkQbcsgE+JR4twVjqfoWoTr8TAiFkK XfQ91u/XTdldgGfGPAeLSjXLGtpgOJOABsTZR6CyiQhzedwPf1oclTpQldHvzhxG J2U3GI+wXjMvNmPOs+GgTuA1l+lLdTsUlshvoz29w0Ts0OHJ2enXTZuwms3YHtII Tsp1tebBSlVEuhKn8dFK37FjPYnYl6oufMcnRBCNNj9Ru+ecJ+UIrj22zfx3JeU= =Q01D -----END PGP SIGNATURE----- --KlAEzMkarCnErv5Q-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/