Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367478
b: refs/heads/master
c: b3ea5f4
h: refs/heads/master
v: v3
  • Loading branch information
Marcus Cooper authored and Lee Jones committed Mar 7, 2013
1 parent d3fde24 commit 2a9e18d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 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: 257107ae6b9ba1f3822a8b079acef57a752dcc4c
refs/heads/master: b3ea5f451e4e435b650e34142f8552002dc21297
11 changes: 7 additions & 4 deletions trunk/drivers/power/ab8500_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#define VBUS_DET_DBNC1 0x01
#define OTP_ENABLE_WD 0x01
#define DROP_COUNT_RESET 0x01
#define USB_CH_DET 0x01

#define MAIN_CH_INPUT_CURR_SHIFT 4
#define VBUS_IN_CURR_LIM_SHIFT 4
Expand Down Expand Up @@ -2348,8 +2349,9 @@ static void ab8500_charger_usb_link_status_work(struct work_struct *work)
AB8500_CHARGER, AB8500_USBCH_CTRL1_REG,
USB_CH_ENA, USB_CH_ENA);
/*Enable charger detection*/
abx500_mask_and_set_register_interruptible(di->dev, AB8500_USB,
AB8500_MCH_IPT_CURLVL_REG, 0x01, 0x01);
abx500_mask_and_set_register_interruptible(di->dev,
AB8500_USB, AB8500_USB_LINE_CTRL2_REG,
USB_CH_DET, USB_CH_DET);
di->invalid_charger_detect_state = 1;
/*exit and wait for new link status interrupt.*/
return;
Expand All @@ -2359,8 +2361,9 @@ static void ab8500_charger_usb_link_status_work(struct work_struct *work)
dev_dbg(di->dev,
"Invalid charger detected, state= 1\n");
/*Stop charger detection*/
abx500_mask_and_set_register_interruptible(di->dev, AB8500_USB,
AB8500_MCH_IPT_CURLVL_REG, 0x01, 0x00);
abx500_mask_and_set_register_interruptible(di->dev,
AB8500_USB, AB8500_USB_LINE_CTRL2_REG,
USB_CH_DET, 0x00);
/*Check link status*/
if (is_ab8500(di->parent))
ret = abx500_get_register_interruptible(di->dev,
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/abx500/ab8500-bm.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* Bank : 0x5
*/
#define AB8500_USB_LINE_STAT_REG 0x80
#define AB8500_USB_LINE_CTRL2_REG 0x82
#define AB8500_USB_LINK1_STAT_REG 0x94

/*
Expand Down

0 comments on commit 2a9e18d

Please sign in to comment.