Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Rabin Vincent and committed by
Lee Jones
261c5136 aee2b846

+13 -8
+13 -8
drivers/power/ab8500_charger.c
··· 441 441 mutex_lock(&di->charger_attached_mutex); 442 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 446 &di->usb_charger_attached_work, 446 447 HZ); 447 448 } else { ··· 2623 2622 2624 2623 mutex_lock(&di->charger_attached_mutex); 2625 2624 mutex_unlock(&di->charger_attached_mutex); 2626 - queue_delayed_work(di->charger_wq, 2625 + 2626 + if (is_ab8500(di->parent)) 2627 + queue_delayed_work(di->charger_wq, 2627 2628 &di->ac_charger_attached_work, 2628 2629 HZ); 2629 2630 return IRQ_HANDLED; ··· 3693 3690 ch_stat = ab8500_charger_detect_chargers(di, false); 3694 3691 3695 3692 if ((ch_stat & AC_PW_CONN) == AC_PW_CONN) { 3696 - queue_delayed_work(di->charger_wq, 3697 - &di->ac_charger_attached_work, 3698 - HZ); 3693 + if (is_ab8500(di->parent)) 3694 + queue_delayed_work(di->charger_wq, 3695 + &di->ac_charger_attached_work, 3696 + HZ); 3699 3697 } 3700 3698 if ((ch_stat & USB_PW_CONN) == USB_PW_CONN) { 3701 - queue_delayed_work(di->charger_wq, 3702 - &di->usb_charger_attached_work, 3703 - HZ); 3699 + if (is_ab8500(di->parent)) 3700 + queue_delayed_work(di->charger_wq, 3701 + &di->usb_charger_attached_work, 3702 + HZ); 3704 3703 } 3705 3704 3706 3705 mutex_unlock(&di->charger_attached_mutex);