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: 133664 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp169069ljf; Wed, 18 Apr 2018 10:48:59 -0700 (PDT) X-Google-Smtp-Source: AIpwx48DTRn5X1cqtuVpfdif/cNm915gPsh65lS/jKbEohXlwmvXDxYV/xKo18SZDwVR8o9sDT2s X-Received: by 10.98.170.13 with SMTP id e13mr2821073pff.137.1524073739035; Wed, 18 Apr 2018 10:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524073739; cv=none; d=google.com; s=arc-20160816; b=H4V+sxts/T7FxXMuwJeqEnhBHJUL7V+QgWAAWS7AaQSf0sQuRgQvU6B2+bwNRlKS+9 z+jdvQtmOt19jy3Wu4mLgfy/4+olLozW6HnrG9z3Vs7/XcbW0khu5QFHwll9aBd/9v4E G85kyQ02J2O0dsiXZzQHyV5XWOrfuOhLYmutvrl1/piKOhxwAPULT/CEMZcOxKtzZoon /as8YsEy9T/NXRNxcxJqEVJWvzWjpOyxwQpJ/DQYhFGIYcRm9oIwnYWqpFhqjaBba6pm GtlXHx6fc/Ja/f+LrisU3+gvmmpAp9aAoeeu5Soo3M4BzKyBpV2NzLcJJe4Mjj2mhO96 t/tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=s/4NwhZ2IKzTctVPHBX016nKeKluACEMnHU6DivE3Hk=; b=XoVbY4Q10nXpTS8AHj1Inm884nOIbcIsW3xwPVUWPdcKBd4s2FYjWC3JHgYO6eTm9R 2zzutpViO+diVnz/miQTdUzh/Y8hMv4S8LDwSvEXYutwGaxAVcG8t4tbK3b4jYJcjj4z qA/uAyH7XqypyqzOLeLjdctaILmwhVjD1Kt6ikcqydCLjvm8OM8NA0qyW/U1cQq/uQyV 3FTZGhezCx5cnwLUAKgLcH9Vld+eMaDlxPUtP9iRWwF/tTQeRm7F0fqXIry2AvG/XZJa adLRI0M0mZiLFYevdFV+WaPu4mbVl95DzKQHgOFM/rmTmJW8RSVWT7YTNzQNYXxbrUeY 6A2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YGXs7RK1; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1-v6si1677290plo.328.2018.04.18.10.48.58; Wed, 18 Apr 2018 10:48:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YGXs7RK1; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbeDRRs5 (ORCPT + 12 others); Wed, 18 Apr 2018 13:48:57 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:42488 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752162AbeDRRs4 (ORCPT ); Wed, 18 Apr 2018 13:48:56 -0400 Received: by mail-wr0-f194.google.com with SMTP id s18-v6so7076727wrg.9 for ; Wed, 18 Apr 2018 10:48:56 -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=hha0dYWaGEVjXchViCbBm6USJvMAF0z4IRwI+AfOlt6Vw+nvDxwxyy5D1jGbpGPbT4 eR6JmeYTGyp0bs9+R9JWS3UDgR/7ev1oskVbxG906KwrAAB+yXoW6+iD1W0TJTP1hxLa MW5e35fZ+lMq8pf5j65Rl95vx9xaWC40jW/YaE0jBwTODd8lOalUSGgmfx68ClxqUpUq +HKa64p/lGiR0Gz/+Dd8j4hNHTGHswGnmQ/LcKitcriCYnsm5jRp+34GoEgW61ag4y0O KOLOaOWApnyopqZDxb5nCJvWmBui05jYhBuUrhtL73HhiqYx087P92yMKkncCuib4VPJ yQFQ== X-Gm-Message-State: ALQs6tC07ppUuMNtBLzLgNI/9OM2tYhIdz5x3ko/OjS1C59lXQUWhsx/ KysGqY5YR7SM+lMwA1JAjXwSrfLnols= 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 Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Srinivas Kandagatla 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 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(-) -- 2.16.2 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);