aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max8925_power.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/power/max8925_power.c b/drivers/power/max8925_power.c
index b16bd71f24f..83b827cf004 100644
--- a/drivers/power/max8925_power.c
+++ b/drivers/power/max8925_power.c
@@ -78,6 +78,7 @@ struct max8925_power_info {
78 unsigned batt_detect:1; /* detecing MB by ID pin */ 78 unsigned batt_detect:1; /* detecing MB by ID pin */
79 unsigned topoff_threshold:2; 79 unsigned topoff_threshold:2;
80 unsigned fast_charge:3; 80 unsigned fast_charge:3;
81 unsigned no_temp_support:1;
81 82
82 int (*set_charger) (int); 83 int (*set_charger) (int);
83}; 84};
@@ -116,7 +117,7 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
116 case MAX8925_IRQ_VCHG_DC_F: 117 case MAX8925_IRQ_VCHG_DC_F:
117 info->ac_online = 0; 118 info->ac_online = 0;
118 __set_charger(info, 0); 119 __set_charger(info, 0);
119 dev_dbg(chip->dev, "Adapter is removal\n"); 120 dev_dbg(chip->dev, "Adapter removed\n");
120 break; 121 break;
121 case MAX8925_IRQ_VCHG_USB_R: 122 case MAX8925_IRQ_VCHG_USB_R:
122 info->usb_online = 1; 123 info->usb_online = 1;
@@ -126,7 +127,7 @@ static irqreturn_t max8925_charger_handler(int irq, void *data)
126 case MAX8925_IRQ_VCHG_USB_F: 127 case MAX8925_IRQ_VCHG_USB_F:
127 info->usb_online = 0; 128 info->usb_online = 0;
128 __set_charger(info, 0); 129 __set_charger(info, 0);
129 dev_dbg(chip->dev, "USB is removal\n"); 130 dev_dbg(chip->dev, "USB removed\n");
130 break; 131 break;
131 case MAX8925_IRQ_VCHG_THM_OK_F: 132 case MAX8925_IRQ_VCHG_THM_OK_F:
132 /* Battery is not ready yet */ 133 /* Battery is not ready yet */
@@ -369,8 +370,10 @@ static __devinit int max8925_init_charger(struct max8925_chip *chip,
369 REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_OVP, "usb-ovp"); 370 REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_OVP, "usb-ovp");
370 REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_F, "usb-remove"); 371 REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_F, "usb-remove");
371 REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_R, "usb-insert"); 372 REQUEST_IRQ(MAX8925_IRQ_VCHG_USB_R, "usb-insert");
372 REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_R, "batt-temp-in-range"); 373 if (!info->no_temp_support) {
373 REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_F, "batt-temp-out-range"); 374 REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_R, "batt-temp-in-range");
375 REQUEST_IRQ(MAX8925_IRQ_VCHG_THM_OK_F, "batt-temp-out-range");
376 }
374 REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_F, "vsys-high"); 377 REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_F, "vsys-high");
375 REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_R, "vsys-low"); 378 REQUEST_IRQ(MAX8925_IRQ_VCHG_SYSLOW_R, "vsys-low");
376 REQUEST_IRQ(MAX8925_IRQ_VCHG_RST, "charger-reset"); 379 REQUEST_IRQ(MAX8925_IRQ_VCHG_RST, "charger-reset");
@@ -477,6 +480,7 @@ static __devinit int max8925_power_probe(struct platform_device *pdev)
477 info->topoff_threshold = pdata->topoff_threshold; 480 info->topoff_threshold = pdata->topoff_threshold;
478 info->fast_charge = pdata->fast_charge; 481 info->fast_charge = pdata->fast_charge;
479 info->set_charger = pdata->set_charger; 482 info->set_charger = pdata->set_charger;
483 info->no_temp_support = pdata->no_temp_support;
480 484
481 max8925_init_charger(chip, info); 485 max8925_init_charger(chip, info);
482 return 0; 486 return 0;