From: Tom Rini Date: Wed, 22 Oct 2014 11:32:11 -0400 Subject: [U-Boot] [PATCH 08/19] dm: regulator: add max77686 regulator driver In-Reply-To: <1412801335-1591-9-git-send-email-p.marczak@samsung.com> References: <1412801335-1591-1-git-send-email-p.marczak@samsung.com> <1412801335-1591-9-git-send-email-p.marczak@samsung.com> Message-ID: <20141022153211.GH25506@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, Oct 08, 2014 at 10:48:44PM +0200, Przemyslaw Marczak wrote: > This commit adds support to max77686 regulator driver > based on a uclass regulator driver-model api, which > provides implementation of all uclass regulator api > function calls. > > New file: drivers/power/regulator/max77686.c > New config: CONFIG_DM_REGULATOR_MAX77686 > > Signed-off-by: Przemyslaw Marczak [snip] > + if (ldo < 1 || ldo > 26) { > + debug("%s: %d is wrong ldo number\n", __func__, ldo); > + return -EINVAL; > + } [snip] > + if (buck < 1 || buck > 9) { > + debug("%s: %d is wrong buck number\n", __func__, buck); > + return -EINVAL; > + } [snip] > + if (ldo < 1 || ldo > 26) { > + debug("%s: %d is wrong ldo number\n", __func__, ldo); > + return -EINVAL; > + } [snip] > + if (mode == 0xff) { > + debug("%s: %d is not supported on LDO%d\n", __func__, *opmode, > + ldo); > + return -EINVAL; > + } [snip] > + if (buck < 1 || buck > 9) { > + debug("%s: %d is wrong buck number\n", __func__, buck); > + return -EINVAL; > + } [snip] > + if (mode == 0xff) { > + debug("%s: %d is not supported on BUCK%d\n", __func__, *opmode, > + buck); > + return -EINVAL; > + } In my mind, all of these error messages are things the user would want to see because they passed the wrong value in, higher up in the chain, as these are eventually exposed at the cli, right? If so, they should be error() prints or otherwise changed around so it's clear to the user what they did wrong. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: