Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1281379ybi; Fri, 14 Jun 2019 11:45:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqzJ318sEe6yfnlvEUrk6SHESN6Aqo4szReS5nUeECZmGnfsyZu6Th34ZMSueIFnaJP/XgyQ X-Received: by 2002:a62:198e:: with SMTP id 136mr96835413pfz.180.1560537915668; Fri, 14 Jun 2019 11:45:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560537915; cv=none; d=google.com; s=arc-20160816; b=LbS4gcsy2fmHSQ+1eVsPtPNhlQDXqdvEvUoxTKlbjcNSva27Pfxn9qfBzfQryy1gWt XLFus5dd3cA/VjxHYGwemB81cSBaN4luKf53XSb/GsQ3THPwm0XaLlc3KWExp7RFCo+V DnRGUeaqHZtWVrBhsS+26Y9zLWW1pYh8JaRh4tv+PO8CW1UjaymOJCyb+PnDaEYj40x/ qI1N59J4u6ylWzmbvT43PUkW4zsgmJqhi2JWcESbHeLhBgFI9JahNkm8Dgw5acx9LSnN fCteW01SeCjgA7V0XIzEXSFnAkihGkLLk832oLjndWXJeAunWnG6xb2OYNmU/rgBzaq5 CEXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qKO3KiNOmtvrogfrG3Ga2A0QL8IaxVgARBNmgmMqWbc=; b=SjXnPhQKm/z9LzXcIKljYXQE1taBPajPTw5wfbo5VYXCvX/HIXP5uNbOXtEyXF90oS uqNge28q64nDhQ2mbhDean9/JNDHcyfiStZZH7FUTMF6A0vVJqN/rm7HX+E6ud+ell8C OTtUr7fJgh0GYPpAVQSKMu7DLhcVTPBQKaMGNTN+TnIs4fP06GfExiy0ReISp6k5Uij2 5JbIrmlgiaplO5zo8DJuq8+EPcow3rNIdYDMsEc2hnAfL6zKmMXTsERhCWGqc4giloK9 C5Q4tnW1PLhi66iFKv9qJtSodt9kHZYjHir8qxs5yTuOPJcBMeKIOLVIZILVYagplKTP N4VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ft6ZMiZj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l1si3203408pld.110.2019.06.14.11.45.00; Fri, 14 Jun 2019 11:45:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=ft6ZMiZj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbfFNSne (ORCPT + 99 others); Fri, 14 Jun 2019 14:43:34 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:38163 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725869AbfFNSne (ORCPT ); Fri, 14 Jun 2019 14:43:34 -0400 Received: by mail-io1-f68.google.com with SMTP id k13so7948229iop.5 for ; Fri, 14 Jun 2019 11:43:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qKO3KiNOmtvrogfrG3Ga2A0QL8IaxVgARBNmgmMqWbc=; b=ft6ZMiZjBwIplcyAR+g+GEB64WpoIXpj9T3gnADsfMXy4KR2J0boLvfDGXxYF4qiPj LH4W9w7AXIBs+77tDpLgl+tTThFHueDp8GOw8AK5bgVXjqsoYYoLqrV31og1bu65FsS9 G7VHMBuaAnS4isoJw+Lp6GqYekNA95B+u9Anc= 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:mime-version :content-transfer-encoding; bh=qKO3KiNOmtvrogfrG3Ga2A0QL8IaxVgARBNmgmMqWbc=; b=k/UyYggJ5HU+gZGSk6H4sX3ek4IcaHnn/MWxKisgzr2cl+DJcczkVDnj9N1W1Bdcgj iRRWAwAsTv/D1KLWkKOO8KiYUOUsvcAM6gj9vkZKhu745kU1PsEaBLt2lz/WIp/bBs6L 171wbSSwCGF4uXiKna4W+36XwzRhj2rOsCA21QX1Iu4qo3yqqCI7huIT3byU6WJ5bXZL RYxIFY8yzWFfNMvFcWpZTg+id1GDIgPcWuYDQOyyw8b8UmoWOd/Pa/w8WuXa+WFeIuVz B+IOKqLe3Nw6OrvIkrsnHIYFHfNYRBvXwmWo2/NoGJKjuFvjT2K/50s+f/9zp11d+rUt gkWQ== X-Gm-Message-State: APjAAAWDhBDXpq7+2LEoMsxmiQ1jx27NYXOZ6aOw8OY7qN4sAXgxnKCw miEAH8pRkNMxriztkUDuOwJOA7csfdLzlw== X-Received: by 2002:a6b:14c2:: with SMTP id 185mr48082904iou.69.1560537813409; Fri, 14 Jun 2019 11:43:33 -0700 (PDT) Received: from localhost ([2620:15c:183:200:33ce:f5cf:f863:d3a6]) by smtp.gmail.com with ESMTPSA id w23sm5655338ioa.51.2019.06.14.11.43.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 11:43:32 -0700 (PDT) From: Fletcher Woodruff To: linux-kernel@vger.kernel.org Cc: Fletcher Woodruff , Jaroslav Kysela , Liam Girdwood , Mark Brown , Oder Chiou , Takashi Iwai , Curtis Malainey , Ross Zwisler , alsa-devel@alsa-project.org Subject: [PATCH v6 0/4] Fix jack detection for Chromebook Pixel Date: Fri, 14 Jun 2019 12:43:11 -0600 Message-Id: <20190614184315.252945-1-fletcherw@chromium.org> X-Mailer: git-send-email 2.22.0.410.gd8fdbe21b5-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ** resending due to corrupted patch ** Headphone/mic jack detection doesn't work on the Chromebook Pixel 2015. This patch changes the irq implementation to support polarity flipping and fixes the configuration code so that correct GPIO pins are read from ACPI. With this series, plugging and unplugging the headphone jack switches between headphones and speakers automatically, and headset microphones are also detected. v6: - Move refactoring into its own patch - Reorder patches so that DT property names patch is first - Clarify commit message for patch which implements irq handler - Remove unused work struct - Make IRQ function return IRQ_HANDLED only if IRQs actually fire v5: - Fix void* parameter to devm_request_threaded_irq v4: - Fix incorrect void* cast in rt5677_irq() v3: - Update commit message for patch 1/3 to clarify why we implement our own irq_chip. v2: - Split IRQ change into two patches: adding and fixing potential race - Change config reading code to try both DT and ACPI style names Ben Zhang (2): ASoC: rt5677: clear interrupts by polarity flip ASoC: rt5677: handle concurrent interrupts Fletcher Woodruff (2): ASoC: rt5677: fall back to DT prop names on error ASoC: rt5677: move jack-detect init to i2c probe sound/soc/codecs/rt5677.c | 319 ++++++++++++++++++++++++++------------ sound/soc/codecs/rt5677.h | 13 +- 2 files changed, 236 insertions(+), 96 deletions(-) -- 2.22.0.410.gd8fdbe21b5-goog