diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-06-17 10:45:07 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2009-09-22 08:32:35 -0400 |
commit | a5d2abce4373810c0109c5939c0094ac16698625 (patch) | |
tree | 816a963a6012b4584fa48c656fce2f00ae16b543 /drivers/regulator/virtual.c | |
parent | a07ac217146e0fac18c80d93e02109f2c96574d0 (diff) |
regulator: Make virtual consumer a bit more chatty
This makes it easier to read the logs when doing testing.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator/virtual.c')
-rw-r--r-- | drivers/regulator/virtual.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c index 5c1d75662b8..144110788fd 100644 --- a/drivers/regulator/virtual.c +++ b/drivers/regulator/virtual.c | |||
@@ -34,6 +34,8 @@ static void update_voltage_constraints(struct device *dev, | |||
34 | 34 | ||
35 | if (data->min_uV && data->max_uV | 35 | if (data->min_uV && data->max_uV |
36 | && data->min_uV <= data->max_uV) { | 36 | && data->min_uV <= data->max_uV) { |
37 | dev_dbg(dev, "Requesting %d-%duV\n", | ||
38 | data->min_uV, data->max_uV); | ||
37 | ret = regulator_set_voltage(data->regulator, | 39 | ret = regulator_set_voltage(data->regulator, |
38 | data->min_uV, data->max_uV); | 40 | data->min_uV, data->max_uV); |
39 | if (ret != 0) { | 41 | if (ret != 0) { |
@@ -44,6 +46,7 @@ static void update_voltage_constraints(struct device *dev, | |||
44 | } | 46 | } |
45 | 47 | ||
46 | if (data->min_uV && data->max_uV && !data->enabled) { | 48 | if (data->min_uV && data->max_uV && !data->enabled) { |
49 | dev_dbg(dev, "Enabling regulator\n"); | ||
47 | ret = regulator_enable(data->regulator); | 50 | ret = regulator_enable(data->regulator); |
48 | if (ret == 0) | 51 | if (ret == 0) |
49 | data->enabled = 1; | 52 | data->enabled = 1; |
@@ -53,6 +56,7 @@ static void update_voltage_constraints(struct device *dev, | |||
53 | } | 56 | } |
54 | 57 | ||
55 | if (!(data->min_uV && data->max_uV) && data->enabled) { | 58 | if (!(data->min_uV && data->max_uV) && data->enabled) { |
59 | dev_dbg(dev, "Disabling regulator\n"); | ||
56 | ret = regulator_disable(data->regulator); | 60 | ret = regulator_disable(data->regulator); |
57 | if (ret == 0) | 61 | if (ret == 0) |
58 | data->enabled = 0; | 62 | data->enabled = 0; |
@@ -69,6 +73,8 @@ static void update_current_limit_constraints(struct device *dev, | |||
69 | 73 | ||
70 | if (data->max_uA | 74 | if (data->max_uA |
71 | && data->min_uA <= data->max_uA) { | 75 | && data->min_uA <= data->max_uA) { |
76 | dev_dbg(dev, "Requesting %d-%duA\n", | ||
77 | data->min_uA, data->max_uA); | ||
72 | ret = regulator_set_current_limit(data->regulator, | 78 | ret = regulator_set_current_limit(data->regulator, |
73 | data->min_uA, data->max_uA); | 79 | data->min_uA, data->max_uA); |
74 | if (ret != 0) { | 80 | if (ret != 0) { |
@@ -80,6 +86,7 @@ static void update_current_limit_constraints(struct device *dev, | |||
80 | } | 86 | } |
81 | 87 | ||
82 | if (data->max_uA && !data->enabled) { | 88 | if (data->max_uA && !data->enabled) { |
89 | dev_dbg(dev, "Enabling regulator\n"); | ||
83 | ret = regulator_enable(data->regulator); | 90 | ret = regulator_enable(data->regulator); |
84 | if (ret == 0) | 91 | if (ret == 0) |
85 | data->enabled = 1; | 92 | data->enabled = 1; |
@@ -89,6 +96,7 @@ static void update_current_limit_constraints(struct device *dev, | |||
89 | } | 96 | } |
90 | 97 | ||
91 | if (!(data->min_uA && data->max_uA) && data->enabled) { | 98 | if (!(data->min_uA && data->max_uA) && data->enabled) { |
99 | dev_dbg(dev, "Disabling regulator\n"); | ||
92 | ret = regulator_disable(data->regulator); | 100 | ret = regulator_disable(data->regulator); |
93 | if (ret == 0) | 101 | if (ret == 0) |
94 | data->enabled = 0; | 102 | data->enabled = 0; |