Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757414AbcDECP0 (ORCPT ); Mon, 4 Apr 2016 22:15:26 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:43712 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756990AbcDECPY (ORCPT ); Mon, 4 Apr 2016 22:15:24 -0400 Date: Mon, 4 Apr 2016 15:26:38 -0700 From: Mark Brown To: Ivaylo Dimitrov Cc: robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com, ijc+devicetree@hellion.org.uk, galak@codeaurora.org, tony@atomide.com, lgirdwood@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Message-ID: <20160404222638.GM2350@sirena.org.uk> References: <20160328093938.GA2350@sirena.org.uk> <1459796234-2430-1-git-send-email-ivo.g.dimitrov.75@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="klUO3blZLrAR18XW" Content-Disposition: inline In-Reply-To: <1459796234-2430-1-git-send-email-ivo.g.dimitrov.75@gmail.com> X-Cookie: If anything can go wrong, it will. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 209.65.105.100 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regulator: twl: Provide of_map_mode for twl4030 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: 1227 Lines: 38 --klUO3blZLrAR18XW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Apr 04, 2016 at 09:57:14PM +0300, Ivaylo Dimitrov wrote: > +For twl4030 regulators/LDOs: > + - regulator-initial-mode: > + - 0x00 - Off mode, the output voltage is not maintained and voltage regulator > + power consumption is 0. This isn't a mode, it's just the regulator being off. Just drop it. > +static inline unsigned int twl4030reg_map_mode(unsigned int mode) > +{ > + return mode == RES_STATE_ACTIVE ? > + REGULATOR_MODE_NORMAL : REGULATOR_MODE_STANDBY; > +} Please write normal if statements, the code should be readable. --klUO3blZLrAR18XW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXAuoZAAoJECTWi3JdVIfQVfIH/R2li9V6BC6G3g25eNNE0G2C tftACfc75RIb5J6Gfp/iPLNa+HEN3lcqq0uAKfBCbtPMPFFvL9a1nAwOxP6rAtli EvVGZ30VYRtUUb6InQWbNaIt0aA8seFydmJOGcPqwbFNcdlQx4x08T1VIFTwlseC YGe1UkdqCdouERC7v+hGJlkGz/xLV188UZVvXgBT9K28/3/qGxVJm38rzNw+2WKP rF5pMnK3kMT65VsWEOjVR8E+aJIv+vAX6YYFFE7XZq+0e11TzU+Pg/EbaZaNKorq Rnl9r0cqKKByUB/JhNfcHsznOaSDdo2b+yBSMdLTrSRy8LGvgVqr8fFEY1eTOoI= =vUeL -----END PGP SIGNATURE----- --klUO3blZLrAR18XW--