From patchwork Fri Sep 8 05:13:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 9943165 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 9E74F6034B for ; Fri, 8 Sep 2017 05:15:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 912352841E for ; Fri, 8 Sep 2017 05:15:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 861DD28438; Fri, 8 Sep 2017 05:15:05 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A43CE2841E for ; Fri, 8 Sep 2017 05:15:04 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 24609267557; Fri, 8 Sep 2017 07:13:39 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 136A7267554; Fri, 8 Sep 2017 07:13:38 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by alsa0.perex.cz (Postfix) with ESMTP id B4D3F26752C for ; Fri, 8 Sep 2017 07:13:30 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 07 Sep 2017 22:13:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.42,360,1500966000"; d="scan'208"; a="1012270301" Received: from rkris16-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.249.11.178]) by orsmga003.jf.intel.com with ESMTP; 07 Sep 2017 22:13:28 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Date: Fri, 8 Sep 2017 00:13:07 -0500 Message-Id: <20170908051309.19028-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170908051309.19028-1-pierre-louis.bossart@linux.intel.com> References: <20170908051309.19028-1-pierre-louis.bossart@linux.intel.com> Cc: Thierry Escande , tiwai@suse.de, Fang@alsa-project.org, Pierre-Louis Bossart , liam.r.girdwood@linux.intel.com, vinod.koul@intel.com, broonie@kernel.org, jarkko.nikula@linux.intel.com, andriy.shevchenko@linux.intel.com, "Fang, Yang A" Subject: [alsa-devel] [PATCH 5/7] ASoC: ts3a227e: add acpi table X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Fang, Yang A" This patch adds the acpi match table for the ts3a227e audio accessory detection device. This enables headset features like jack plug/unplug notifications, mic presence, and button pressed events. Signed-off-by: Fang, Yang A Signed-off-by: Thierry Escande Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/ts3a227e.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c index 4356843..738e04b 100644 --- a/sound/soc/codecs/ts3a227e.c +++ b/sound/soc/codecs/ts3a227e.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -374,11 +375,20 @@ static const struct of_device_id ts3a227e_of_match[] = { }; MODULE_DEVICE_TABLE(of, ts3a227e_of_match); +#ifdef CONFIG_ACPI +static struct acpi_device_id ts3a227e_acpi_match[] = { + { "104C227E", 0 }, + {}, +}; +MODULE_DEVICE_TABLE(acpi, ts3a227e_acpi_match); +#endif + static struct i2c_driver ts3a227e_driver = { .driver = { .name = "ts3a227e", .pm = &ts3a227e_pm, .of_match_table = of_match_ptr(ts3a227e_of_match), + .acpi_match_table = ACPI_PTR(ts3a227e_acpi_match), }, .probe = ts3a227e_i2c_probe, .id_table = ts3a227e_i2c_ids,