Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283439
b: refs/heads/master
c: 92de378
h: refs/heads/master
i:
  283437: 899f927
  283435: da55bfb
  283431: d8119e9
  283423: 2747263
v: v3
  • Loading branch information
Philip Rakity authored and Anton Vorontsov committed Nov 25, 2011
1 parent e207433 commit 6ce488d
Show file tree
Hide file tree
Showing 3 changed files with 10 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: 9c9cf9e26363d0c06d0e01d5304477be97ace5cb
refs/heads/master: 92de378b739115c8afaae5cd3f25159406bb9914
12 changes: 8 additions & 4 deletions trunk/drivers/power/max8925_power.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ struct max8925_power_info {
unsigned batt_detect:1; /* detecing MB by ID pin */
unsigned topoff_threshold:2;
unsigned fast_charge:3;
unsigned no_temp_support:1;

int (*set_charger) (int);
};
Expand Down Expand Up @@ -116,7 +117,7 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
case MAX8925_IRQ_VCHG_DC_F:
info->ac_online = 0;
__set_charger(info, 0);
dev_dbg(chip->dev, "Adapter is removal\n");
dev_dbg(chip->dev, "Adapter removed\n");
break;
case MAX8925_IRQ_VCHG_USB_R:
info->usb_online = 1;
Expand All @@ -126,7 +127,7 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
case MAX8925_IRQ_VCHG_USB_F:
info->usb_online = 0;
__set_charger(info, 0);
dev_dbg(chip->dev, "USB is removal\n");
dev_dbg(chip->dev, "USB removed\n");
break;
case MAX8925_IRQ_VCHG_THM_OK_F:
/* Battery is not ready yet */
Expand Down Expand Up @@ -369,8 +370,10 @@ static __devinit int max8925_init_charger(struct max8925_chip *chip,
REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_OVP, "usb-ovp");
REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_F, "usb-remove");
REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_R, "usb-insert");
REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_R, "batt-temp-in-range");
REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_F, "batt-temp-out-range");
if (!info->no_temp_support) {
REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_R, "batt-temp-in-range");
REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_F, "batt-temp-out-range");
}
REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_F, "vsys-high");
REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_R, "vsys-low");
REQUEST_IRQ(MAX8925_IRQ_VCHG_RST, "charger-reset");
Expand Down Expand Up @@ -477,6 +480,7 @@ static __devinit int max8925_power_probe(struct platform_device *pdev)
info->topoff_threshold = pdata->topoff_threshold;
info->fast_charge = pdata->fast_charge;
info->set_charger = pdata->set_charger;
info->no_temp_support = pdata->no_temp_support;

max8925_init_charger(chip, info);
return 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/mfd/max8925.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ struct max8925_power_pdata {
unsigned batt_detect:1;
unsigned topoff_threshold:2;
unsigned fast_charge:3; /* charge current */
unsigned no_temp_support:1; /* set if no temperature detect */
};

/*
Expand Down

0 comments on commit 6ce488d

Please sign in to comment.