
22 Oct
2014
22 Oct
'14
5:32 p.m.
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 p.marczak@samsung.com
[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