From: Tom Rini Date: Wed, 12 Jul 2017 13:31:20 -0400 Subject: [U-Boot] [PATCH 1/3] regulator: pbias: Add PBIAS regulator for proper voltage switching on MMC1 In-Reply-To: <1499853355-4255-2-git-send-email-jjhiblot@ti.com> References: <1499853355-4255-1-git-send-email-jjhiblot@ti.com> <1499853355-4255-2-git-send-email-jjhiblot@ti.com> Message-ID: <20170712173120.GJ14320@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jul 12, 2017 at 11:55:53AM +0200, Jean-Jacques Hiblot wrote: > In the TI SOCs a PBIAS cell exists to provide a bias voltage to the MMC1 > IO cells. Without this bias voltage these I/O cells can not function > properly. The PBIAS cell is controlled by software. > > Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Tom Rini But a minor thing: > + if (!*p) { > +#ifdef DEBUG > + int i = 0; > + const char *s; > + > + debug("regulator "); > + while ((s = fdt_stringlist_get(gd->fdt_blob, dev_of_offset(dev), > + "regulator-name", i++, NULL))) > + debug("%s'%s' ", (i > 1) ? ", " : "", s); > + debug("%s not supported\n", (i > 2) ? "are" : "is"); > +#endif > + return -EINVAL; > + } We should not need the DEBUG guard here as the string constants will get discarded with gcc-6.x (default min requirement starting in v2018.01) and a while(...) do nothing should get optimized away, and even if not, it's just the error case. I think we can stand clearer reading code here compared with a few extra bytes. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: