aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/extcon/extcon-arizona.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-07-18 17:42:22 -0400
committerChanwoo Choi <cw00.choi@samsung.com>2013-08-04 19:53:34 -0400
commitdf9a5ab46332b58a0ce8877fe65c7e98b9f36e8a (patch)
treea107497050a4d56bf8099e38fb92e52ab5f7cb0b /drivers/extcon/extcon-arizona.c
parent7281e05aabee7484624d448da208932690ed62b3 (diff)
extcon: arizona: Use power efficient workqueue
None of the delayed work the driver schedules has particularly short delays and it is not performance sensitive so let the scheduler run it wherever is most efficient rather than in a per CPU workqueue by using the system power efficient workqueue. Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Myungjoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-arizona.c')
-rw-r--r--drivers/extcon/extcon-arizona.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/extcon/extcon-arizona.c b/drivers/extcon/extcon-arizona.c
index 7a1b4a7791ba..e55713083c78 100644
--- a/drivers/extcon/extcon-arizona.c
+++ b/drivers/extcon/extcon-arizona.c
@@ -890,8 +890,9 @@ static void arizona_micd_detect(struct work_struct *work)
890 890
891handled: 891handled:
892 if (info->detecting) 892 if (info->detecting)
893 schedule_delayed_work(&info->micd_timeout_work, 893 queue_delayed_work(system_power_efficient_wq,
894 msecs_to_jiffies(info->micd_timeout)); 894 &info->micd_timeout_work,
895 msecs_to_jiffies(info->micd_timeout));
895 896
896 pm_runtime_mark_last_busy(info->dev); 897 pm_runtime_mark_last_busy(info->dev);
897 mutex_unlock(&info->lock); 898 mutex_unlock(&info->lock);
@@ -912,8 +913,9 @@ static irqreturn_t arizona_micdet(int irq, void *data)
912 mutex_unlock(&info->lock); 913 mutex_unlock(&info->lock);
913 914
914 if (debounce) 915 if (debounce)
915 schedule_delayed_work(&info->micd_detect_work, 916 queue_delayed_work(system_power_efficient_wq,
916 msecs_to_jiffies(debounce)); 917 &info->micd_detect_work,
918 msecs_to_jiffies(debounce));
917 else 919 else
918 arizona_micd_detect(&info->micd_detect_work.work); 920 arizona_micd_detect(&info->micd_detect_work.work);
919 921
@@ -967,12 +969,14 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
967 if (val == info->last_jackdet) { 969 if (val == info->last_jackdet) {
968 dev_dbg(arizona->dev, "Suppressing duplicate JACKDET\n"); 970 dev_dbg(arizona->dev, "Suppressing duplicate JACKDET\n");
969 if (cancelled_hp) 971 if (cancelled_hp)
970 schedule_delayed_work(&info->hpdet_work, 972 queue_delayed_work(system_power_efficient_wq,
971 msecs_to_jiffies(HPDET_DEBOUNCE)); 973 &info->hpdet_work,
974 msecs_to_jiffies(HPDET_DEBOUNCE));
972 975
973 if (cancelled_mic) 976 if (cancelled_mic)
974 schedule_delayed_work(&info->micd_timeout_work, 977 queue_delayed_work(system_power_efficient_wq,
975 msecs_to_jiffies(info->micd_timeout)); 978 &info->micd_timeout_work,
979 msecs_to_jiffies(info->micd_timeout));
976 980
977 goto out; 981 goto out;
978 } 982 }
@@ -994,8 +998,9 @@ static irqreturn_t arizona_jackdet(int irq, void *data)
994 998
995 arizona_start_mic(info); 999 arizona_start_mic(info);
996 } else { 1000 } else {
997 schedule_delayed_work(&info->hpdet_work, 1001 queue_delayed_work(system_power_efficient_wq,
998 msecs_to_jiffies(HPDET_DEBOUNCE)); 1002 &info->hpdet_work,
1003 msecs_to_jiffies(HPDET_DEBOUNCE));
999 } 1004 }
1000 1005
1001 regmap_update_bits(arizona->regmap, 1006 regmap_update_bits(arizona->regmap,