Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274649

Re: [PATCH] regulator: of: simplifing the parsing code

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] regulator: of: simplifing the parsing code
Date Sat, 21 Nov 2015 14:30:01 +0100
Message-ID <qxgoN-5Py-9@gated-at.bofh.it> (permalink)
References <qwOLU-4hH-5@gated-at.bofh.it>
X-Original-To Saurabh Sengar <saurabh.truth@gmail.com>
MIME-Version 1.0
Content-Type multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KlAEzMkarCnErv5Q"
Content-Disposition inline
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
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 robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 51
Organization linux.* mail to news gateway
X-Original-Cc lgirdwood@gmail.com, linux-kernel@vger.kernel.org
X-Original-Date Sat, 21 Nov 2015 13:22:02 +0000
X-Original-Message-ID <20151121132202.GE26072@sirena.org.uk>
X-Original-References <1448006247-4749-1-git-send-email-saurabh.truth@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1274649

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] regulator: of: simplifing the parsing code Saurabh Sengar <saurabh.truth@gmail.com> - 2015-11-20 09:00 +0100
  Re: [PATCH] regulator: of: simplifing the parsing code Mark Brown <broonie@kernel.org> - 2015-11-21 14:30 +0100
    Re: [PATCH] regulator: of: simplifing the parsing code Saurabh Sengar <saurabh.truth@gmail.com> - 2015-11-21 15:20 +0100
      Re: [PATCH] regulator: of: simplifing the parsing code Mark Brown <broonie@kernel.org> - 2015-11-22 14:10 +0100

csiph-web