diff options
author | Rabin Vincent <rabin.vincent@stericsson.com> | 2012-09-26 07:36:38 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-03-06 23:35:52 -0500 |
commit | 261c5136fa988008387e31cf5381dc5b088e2a17 (patch) | |
tree | 1bf21c97a86f799fa306b5c07ef5b4c9830541e2 /drivers/power/ab8500_charger.c | |
parent | aee2b8468caf3d1eed6e329e828bc09eaa61063a (diff) |
ab8500-charger: Run detect workaround only on AB8500
Only AB8500 has this hardware bug, so these works only need to be run
there.
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Martin SJOBLOM <martin.w.sjoblom@stericsson.com>
Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/power/ab8500_charger.c')
-rw-r--r-- | drivers/power/ab8500_charger.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/power/ab8500_charger.c b/drivers/power/ab8500_charger.c index 64accb235d2c..853002843984 100644 --- a/drivers/power/ab8500_charger.c +++ b/drivers/power/ab8500_charger.c | |||
@@ -441,7 +441,8 @@ static void ab8500_charger_set_usb_connected(struct ab8500_charger *di, | |||
441 | mutex_lock(&di->charger_attached_mutex); | 441 | mutex_lock(&di->charger_attached_mutex); |
442 | mutex_unlock(&di->charger_attached_mutex); | 442 | mutex_unlock(&di->charger_attached_mutex); |
443 | 443 | ||
444 | queue_delayed_work(di->charger_wq, | 444 | if (is_ab8500(di->parent)) |
445 | queue_delayed_work(di->charger_wq, | ||
445 | &di->usb_charger_attached_work, | 446 | &di->usb_charger_attached_work, |
446 | HZ); | 447 | HZ); |
447 | } else { | 448 | } else { |
@@ -2622,7 +2623,9 @@ static irqreturn_t ab8500_charger_mainchplugdet_handler(int irq, void *_di) | |||
2622 | 2623 | ||
2623 | mutex_lock(&di->charger_attached_mutex); | 2624 | mutex_lock(&di->charger_attached_mutex); |
2624 | mutex_unlock(&di->charger_attached_mutex); | 2625 | mutex_unlock(&di->charger_attached_mutex); |
2625 | queue_delayed_work(di->charger_wq, | 2626 | |
2627 | if (is_ab8500(di->parent)) | ||
2628 | queue_delayed_work(di->charger_wq, | ||
2626 | &di->ac_charger_attached_work, | 2629 | &di->ac_charger_attached_work, |
2627 | HZ); | 2630 | HZ); |
2628 | return IRQ_HANDLED; | 2631 | return IRQ_HANDLED; |
@@ -3690,14 +3693,16 @@ static int ab8500_charger_probe(struct platform_device *pdev) | |||
3690 | ch_stat = ab8500_charger_detect_chargers(di, false); | 3693 | ch_stat = ab8500_charger_detect_chargers(di, false); |
3691 | 3694 | ||
3692 | if ((ch_stat & AC_PW_CONN) == AC_PW_CONN) { | 3695 | if ((ch_stat & AC_PW_CONN) == AC_PW_CONN) { |
3693 | queue_delayed_work(di->charger_wq, | 3696 | if (is_ab8500(di->parent)) |
3694 | &di->ac_charger_attached_work, | 3697 | queue_delayed_work(di->charger_wq, |
3695 | HZ); | 3698 | &di->ac_charger_attached_work, |
3699 | HZ); | ||
3696 | } | 3700 | } |
3697 | if ((ch_stat & USB_PW_CONN) == USB_PW_CONN) { | 3701 | if ((ch_stat & USB_PW_CONN) == USB_PW_CONN) { |
3698 | queue_delayed_work(di->charger_wq, | 3702 | if (is_ab8500(di->parent)) |
3699 | &di->usb_charger_attached_work, | 3703 | queue_delayed_work(di->charger_wq, |
3700 | HZ); | 3704 | &di->usb_charger_attached_work, |
3705 | HZ); | ||
3701 | } | 3706 | } |
3702 | 3707 | ||
3703 | mutex_unlock(&di->charger_attached_mutex); | 3708 | mutex_unlock(&di->charger_attached_mutex); |