From: Dmitry Torokhov Date: Tue, 17 May 2016 00:25:08 +0000 (-0700) Subject: Merge branch 'next' into for-linus X-Git-Tag: v4.7~11^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23ea5967d6bd30ed59480edbc5fe21eec81682a3;p=platform%2Fkernel%2Flinux-amlogic.git Merge branch 'next' into for-linus Prepare first round of input updates for 4.7 merge window. --- 23ea5967d6bd30ed59480edbc5fe21eec81682a3 diff --cc drivers/input/misc/twl6040-vibra.c index 42de34b,36c8182..5690eb7 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@@ -45,8 -45,9 +45,8 @@@ struct vibra_info { struct device *dev; struct input_dev *input_dev; - struct workqueue_struct *workqueue; struct work_struct play_work; - struct mutex mutex; + int irq; bool enabled; @@@ -181,17 -182,7 +181,15 @@@ static void vibra_play_work(struct work { struct vibra_info *info = container_of(work, struct vibra_info, play_work); + int ret; + + /* Do not allow effect, while the routing is set to use audio */ + ret = twl6040_get_vibralr_status(info->twl6040); + if (ret & TWL6040_VIBSEL) { + dev_info(info->dev, "Vibra is configured for audio\n"); + return; + } - mutex_lock(&info->mutex); - if (info->weak_speed || info->strong_speed) { if (!info->enabled) twl6040_vibra_enable(info);