Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367475
b: refs/heads/master
c: 88efdb8
h: refs/heads/master
i:
  367473: cfa515a
  367471: a0e2535
v: v3
  • Loading branch information
Marcus Cooper authored and Lee Jones committed Mar 7, 2013
1 parent a293d16 commit 40323dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 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: 861a30da53e2c5b9823b5390c1757baaf8f6e356
refs/heads/master: 88efdb8022f13c198fe4459e6e278f9b559cff3b
21 changes: 16 additions & 5 deletions trunk/drivers/power/ab8500_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2320,8 +2320,13 @@ static void ab8500_charger_usb_link_status_work(struct work_struct *work)
* to start the charging process. but by jumping
* thru a few hoops it can be forced to start.
*/
ret = abx500_get_register_interruptible(di->dev, AB8500_USB,
AB8500_USB_LINE_STAT_REG, &val);
if (is_ab8500(di->parent))
ret = abx500_get_register_interruptible(di->dev, AB8500_USB,
AB8500_USB_LINE_STAT_REG, &val);
else
ret = abx500_get_register_interruptible(di->dev, AB8500_USB,
AB8500_USB_LINK1_STAT_REG, &val);

if (ret >= 0)
dev_dbg(di->dev, "UsbLineStatus register = 0x%02x\n", val);
else
Expand Down Expand Up @@ -2357,9 +2362,15 @@ static void ab8500_charger_usb_link_status_work(struct work_struct *work)
abx500_mask_and_set_register_interruptible(di->dev, AB8500_USB,
AB8500_MCH_IPT_CURLVL_REG, 0x01, 0x00);
/*Check link status*/
ret = abx500_get_register_interruptible(di->dev,
AB8500_USB,
AB8500_USB_LINE_STAT_REG, &val);
if (is_ab8500(di->parent))
ret = abx500_get_register_interruptible(di->dev,
AB8500_USB, AB8500_USB_LINE_STAT_REG,
&val);
else
ret = abx500_get_register_interruptible(di->dev,
AB8500_USB, AB8500_USB_LINK1_STAT_REG,
&val);

dev_dbg(di->dev, "USB link status= 0x%02x\n",
(val & link_status) >> USB_LINK_STATUS_SHIFT);
di->invalid_charger_detect_state = 2;
Expand Down

0 comments on commit 40323dc

Please sign in to comment.