Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330486
b: refs/heads/master
c: dbb61fc
h: refs/heads/master
v: v3
  • Loading branch information
Chanwoo Choi authored and Anton Vorontsov committed Aug 23, 2012
1 parent 949f717 commit 934a44b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c084e092e47ca2435673702c6cf6e87a731ecc6f
refs/heads/master: dbb61fc7452632a4225b2fe3719b6c2d1306e257
19 changes: 17 additions & 2 deletions trunk/drivers/power/charger-manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,24 @@ static int try_charger_enable(struct charger_manager *cm, bool enable)
if (enable) {
if (cm->emergency_stop)
return -EAGAIN;
for (i = 0 ; i < desc->num_charger_regulators ; i++)
regulator_enable(desc->charger_regulators[i].consumer);
for (i = 0 ; i < desc->num_charger_regulators ; i++) {
err = regulator_enable(desc->charger_regulators[i].consumer);
if (err < 0) {
dev_warn(cm->dev,
"Cannot enable %s regulator\n",
desc->charger_regulators[i].regulator_name);
}
}
} else {
for (i = 0 ; i < desc->num_charger_regulators ; i++) {
err = regulator_disable(desc->charger_regulators[i].consumer);
if (err < 0) {
dev_warn(cm->dev,
"Cannot disable %s regulator\n",
desc->charger_regulators[i].regulator_name);
}
}

/*
* Abnormal battery state - Stop charging forcibly,
* even if charger was enabled at the other places
Expand Down

0 comments on commit 934a44b

Please sign in to comment.