aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/wm8350_power.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/wm8350_power.c')
-rw-r--r--drivers/power/wm8350_power.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/power/wm8350_power.c b/drivers/power/wm8350_power.c
index 6e634cf7fc14..ad4f071e1287 100644
--- a/drivers/power/wm8350_power.c
+++ b/drivers/power/wm8350_power.c
@@ -391,80 +391,54 @@ static void wm8350_init_charger(struct wm8350 *wm8350)
391 /* register our interest in charger events */ 391 /* register our interest in charger events */
392 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT, 392 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT,
393 wm8350_charger_handler, 0, "Battery hot", wm8350); 393 wm8350_charger_handler, 0, "Battery hot", wm8350);
394 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT);
395 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD, 394 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD,
396 wm8350_charger_handler, 0, "Battery cold", wm8350); 395 wm8350_charger_handler, 0, "Battery cold", wm8350);
397 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD);
398 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL, 396 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL,
399 wm8350_charger_handler, 0, "Battery fail", wm8350); 397 wm8350_charger_handler, 0, "Battery fail", wm8350);
400 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL);
401 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_TO, 398 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_TO,
402 wm8350_charger_handler, 0, 399 wm8350_charger_handler, 0,
403 "Charger timeout", wm8350); 400 "Charger timeout", wm8350);
404 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_TO);
405 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_END, 401 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_END,
406 wm8350_charger_handler, 0, 402 wm8350_charger_handler, 0,
407 "Charge end", wm8350); 403 "Charge end", wm8350);
408 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_END);
409 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_START, 404 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_START,
410 wm8350_charger_handler, 0, 405 wm8350_charger_handler, 0,
411 "Charge start", wm8350); 406 "Charge start", wm8350);
412 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_START);
413 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_FAST_RDY, 407 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_FAST_RDY,
414 wm8350_charger_handler, 0, 408 wm8350_charger_handler, 0,
415 "Fast charge ready", wm8350); 409 "Fast charge ready", wm8350);
416 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_FAST_RDY);
417 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9, 410 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9,
418 wm8350_charger_handler, 0, 411 wm8350_charger_handler, 0,
419 "Battery <3.9V", wm8350); 412 "Battery <3.9V", wm8350);
420 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9);
421 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1, 413 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1,
422 wm8350_charger_handler, 0, 414 wm8350_charger_handler, 0,
423 "Battery <3.1V", wm8350); 415 "Battery <3.1V", wm8350);
424 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1);
425 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85, 416 wm8350_register_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85,
426 wm8350_charger_handler, 0, 417 wm8350_charger_handler, 0,
427 "Battery <2.85V", wm8350); 418 "Battery <2.85V", wm8350);
428 419
429 wm8350_unmask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85);
430
431 /* and supply change events */ 420 /* and supply change events */
432 wm8350_register_irq(wm8350, WM8350_IRQ_EXT_USB_FB, 421 wm8350_register_irq(wm8350, WM8350_IRQ_EXT_USB_FB,
433 wm8350_charger_handler, 0, "USB", wm8350); 422 wm8350_charger_handler, 0, "USB", wm8350);
434 wm8350_unmask_irq(wm8350, WM8350_IRQ_EXT_USB_FB);
435 wm8350_register_irq(wm8350, WM8350_IRQ_EXT_WALL_FB, 423 wm8350_register_irq(wm8350, WM8350_IRQ_EXT_WALL_FB,
436 wm8350_charger_handler, 0, "Wall", wm8350); 424 wm8350_charger_handler, 0, "Wall", wm8350);
437 wm8350_unmask_irq(wm8350, WM8350_IRQ_EXT_WALL_FB);
438 wm8350_register_irq(wm8350, WM8350_IRQ_EXT_BAT_FB, 425 wm8350_register_irq(wm8350, WM8350_IRQ_EXT_BAT_FB,
439 wm8350_charger_handler, 0, "Battery", wm8350); 426 wm8350_charger_handler, 0, "Battery", wm8350);
440 wm8350_unmask_irq(wm8350, WM8350_IRQ_EXT_BAT_FB);
441} 427}
442 428
443static void free_charger_irq(struct wm8350 *wm8350) 429static void free_charger_irq(struct wm8350 *wm8350)
444{ 430{
445 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT);
446 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT); 431 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_HOT);
447 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD);
448 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD); 432 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_COLD);
449 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL);
450 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL); 433 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_BAT_FAIL);
451 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_TO);
452 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO); 434 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_TO);
453 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_END);
454 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_END); 435 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_END);
455 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_START);
456 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_START); 436 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_START);
457 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9);
458 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9); 437 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P9);
459 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1);
460 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1); 438 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_3P1);
461 wm8350_mask_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85);
462 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85); 439 wm8350_free_irq(wm8350, WM8350_IRQ_CHG_VBATT_LT_2P85);
463 wm8350_mask_irq(wm8350, WM8350_IRQ_EXT_USB_FB);
464 wm8350_free_irq(wm8350, WM8350_IRQ_EXT_USB_FB); 440 wm8350_free_irq(wm8350, WM8350_IRQ_EXT_USB_FB);
465 wm8350_mask_irq(wm8350, WM8350_IRQ_EXT_WALL_FB);
466 wm8350_free_irq(wm8350, WM8350_IRQ_EXT_WALL_FB); 441 wm8350_free_irq(wm8350, WM8350_IRQ_EXT_WALL_FB);
467 wm8350_mask_irq(wm8350, WM8350_IRQ_EXT_BAT_FB);
468 wm8350_free_irq(wm8350, WM8350_IRQ_EXT_BAT_FB); 442 wm8350_free_irq(wm8350, WM8350_IRQ_EXT_BAT_FB);
469} 443}
470 444