[U-Boot] [PATCH 1/3] regulator: pbias: Add PBIAS regulator for proper voltage switching on MMC1
Tom Rini
trini at konsulko.com
Wed Jul 12 17:31:20 UTC 2017
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 <jjhiblot at ti.com>
Reviewed-by: Tom Rini <trini at konsulko.com>
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: <http://lists.denx.de/pipermail/u-boot/attachments/20170712/f46b1999/attachment.sig>
More information about the U-Boot
mailing list