Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367445
b: refs/heads/master
c: abee26c
h: refs/heads/master
i:
  367443: f4ea3a8
v: v3
  • Loading branch information
Mattias Wallin authored and Lee Jones committed Mar 7, 2013
1 parent f89e6af commit 1fffa41
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 127629d74efff202372fbd6097e607fcb2c8a7af
refs/heads/master: abee26cdb685fa47d3d17ec9cf39f6149ce67083
26 changes: 26 additions & 0 deletions trunk/drivers/mfd/ab8500-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,15 @@ static int ab8500_probe(struct platform_device *pdev)
"Battery level lower than power on reset threshold",
"Power on key 1 pressed longer than 10 seconds",
"DB8500 thermal shutdown"};
static char *turn_on_status[] = {
"Battery rising (Vbat)",
"Power On Key 1 dbF",
"Power On Key 2 dbF",
"RTC Alarm",
"Main Charger Detect",
"Vbus Detect (USB)",
"USB ID Detect",
"UART Factory Mode Detect"};
struct ab8500_platform_data *plat = dev_get_platdata(&pdev->dev);
const struct platform_device_id *platid = platform_get_device_id(pdev);
enum ab8500_version version = AB8500_VERSION_UNDEFINED;
Expand Down Expand Up @@ -1655,9 +1664,26 @@ static int ab8500_probe(struct platform_device *pdev)
} else {
printk(KERN_CONT " None\n");
}
ret = get_register_interruptible(ab8500, AB8500_SYS_CTRL1_BLOCK,
AB8500_TURN_ON_STATUS, &value);
if (ret < 0)
return ret;
dev_info(ab8500->dev, "turn on reason(s) (%#x): ", value);

if (value) {
for (i = 0; i < ARRAY_SIZE(turn_on_status); i++) {
if (value & 1)
printk("\"%s\" ", turn_on_status[i]);
value = value >> 1;
}
printk("\n");
} else {
printk("None\n");
}

if (plat && plat->init)
plat->init(ab8500);

if (is_ab9540(ab8500)) {
ret = get_register_interruptible(ab8500, AB8500_CHARGER,
AB8500_CH_USBCH_STAT1_REG, &value);
Expand Down

0 comments on commit 1fffa41

Please sign in to comment.