From patchwork Wed Apr 18 17:46:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 10348745 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A718460244 for ; Wed, 18 Apr 2018 17:49:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9671328782 for ; Wed, 18 Apr 2018 17:49:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8A1AC28796; Wed, 18 Apr 2018 17:49:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F11F28782 for ; Wed, 18 Apr 2018 17:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=gxAc4LhknbR8FJgd0H/9Nn7R38ekB25dXT72rjwyKW0=; b=g8j Io8CPz+eANUyBRAqrVW9TmX2gzYL2k9/xUDwUhuxwU1Uu26pexPRPv2BHzcyXk96twDLmD+xqwFi2 2PtFFG2mAJJgB4Iff4aXRdsjwiyAwG9I9IUO+Sn6aMOL5nYs7wSXyUdSi88kvaliUuYst2OQOVy+5 YvxWXkoOyQDh7s507nOzcbnMykKPg1fTEc9uI81Ef1xffK3MJkFOPj1Q8pwg368VJm1l5/RPp9LHZ RFBFE0bZbsB8Wh1eJvLet0/YyJf/KV8idGneWA0SBWanIkaNrcX4a7K4ruGuvMHC4czZy6tEkqsro xNVIGtl0aY40kHLlbRtYQTJ1HRRiRgA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8rCh-0004f6-Kk; Wed, 18 Apr 2018 17:49:11 +0000 Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f8rCd-0004cR-Kz for linux-arm-kernel@lists.infradead.org; Wed, 18 Apr 2018 17:49:09 +0000 Received: by mail-wr0-x242.google.com with SMTP id v60-v6so7073752wrc.7 for ; Wed, 18 Apr 2018 10:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=F0Bxz8HPeCNMllQxJfhHZxfq7uDsKhyjnFogrPvtHy0=; b=YGXs7RK1gsD96FdNogaaHtDeFJ/gCYpIgG84uDuqYB0ha6sU3qwGc+Wto5NdjgOWmK s1RmOr0dtpl/uGeApBaFkiS+PQqDM3CQpuvh7XC4/eEJt1SamtuSiTpbRNNjrwAi6aWP JVDoL2asaUEC5xOH9AeZhGTPyl4BAqHyNVR0U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=F0Bxz8HPeCNMllQxJfhHZxfq7uDsKhyjnFogrPvtHy0=; b=gkhRWdZbkwSs2uSoF+oawrQnqupqX/22YpDNUSQ5h5oYuZ+9NRrYLmrI9OXZs85ypF Qf8gTmj2suGBDqAY0YZjjJpW72LDFlb2wegVzEaqZUo+/BRjj0iSIEWnNF5ScwGHWvN2 HgWHjO1jM6mDNojoMON96CAzm7RwQ3Ndd5oA+Lis6WkiV/3bihFSQHNYyZmP8ctY++oL Yp0HPrMKciZ+g8EaPQMnm5ncegTaqdWdf9qTSWgHaiFSRa3A/69128FdS9qNobL9d5j1 ylMws0SZB7e9+dMOVAcetaBrKpRgDQhk97Q8MxPV86Momlca4DTxHzsCRPk1ILRewdPx RkCw== X-Gm-Message-State: ALQs6tAfVVT5rFM1KaKxLxbjY7mFa3SZIDTIJewkxMglvwjvOIitYmzb tfcBI42s2fPmmPc4WjVGs3DXhA== X-Google-Smtp-Source: AIpwx4+qTISSMi6NyHd8fA7+xQ9N41Pyl7RjwbVYXwBahALpZGHPp2MOq+lWmxi5If2SDnEJ8UYWkQ== X-Received: by 10.28.136.199 with SMTP id k190mr2501191wmd.154.1524073735708; Wed, 18 Apr 2018 10:48:55 -0700 (PDT) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id n20sm1684243wmc.24.2018.04.18.10.48.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Apr 2018 10:48:54 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: broonie@kernel.org, linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org Subject: [PATCH] ASoC: msm8916-wcd-analog: use threaded context for mbhc events Date: Wed, 18 Apr 2018 18:46:37 +0100 Message-Id: <20180418174637.24041-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.16.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180418_104907_705747_D0FE705B X-CRM114-Status: GOOD ( 11.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Srinivas Kandagatla , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Srinivas Kandagatla As snd_soc_jack_report() can sleep, move handling of mbhc events to a thread context rather than in interrupt context. Fixes: de66b3455023 ('ASoC: codecs: msm8916-wcd-analog: add MBHC support') Reported-by: Bjorn Andersson Signed-off-by: Srinivas Kandagatla --- sound/soc/codecs/msm8916-wcd-analog.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c index 12ee83d52405..b7cf7cce95fe 100644 --- a/sound/soc/codecs/msm8916-wcd-analog.c +++ b/sound/soc/codecs/msm8916-wcd-analog.c @@ -1187,7 +1187,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) return irq; } - ret = devm_request_irq(dev, irq, pm8916_mbhc_switch_irq_handler, + ret = devm_request_threaded_irq(dev, irq, NULL, + pm8916_mbhc_switch_irq_handler, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mbhc switch irq", priv); @@ -1201,7 +1202,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) return irq; } - ret = devm_request_irq(dev, irq, mbhc_btn_press_irq_handler, + ret = devm_request_threaded_irq(dev, irq, NULL, + mbhc_btn_press_irq_handler, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mbhc btn press irq", priv); @@ -1214,7 +1216,8 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev) return irq; } - ret = devm_request_irq(dev, irq, mbhc_btn_release_irq_handler, + ret = devm_request_threaded_irq(dev, irq, NULL, + mbhc_btn_release_irq_handler, IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "mbhc btn release irq", priv);