From patchwork Thu Jun 15 12:46:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9788791 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 D992A60384 for ; Thu, 15 Jun 2017 12:48:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB41128066 for ; Thu, 15 Jun 2017 12:48:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BF8DD285C2; Thu, 15 Jun 2017 12:48:34 +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 E257328066 for ; Thu, 15 Jun 2017 12:48:33 +0000 (UTC) Received: from alsa.alsa-project.org (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 40FA02673C4; Thu, 15 Jun 2017 14:47:49 +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 2083026699F; Thu, 15 Jun 2017 14:46:51 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by alsa0.perex.cz (Postfix) with ESMTP id 538EE266A56 for ; Thu, 15 Jun 2017 14:46:44 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jun 2017 05:46:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.39,343,1493708400"; d="scan'208"; a="1141557119" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga001.jf.intel.com with ESMTP; 15 Jun 2017 05:46:39 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id E7BC6112; Thu, 15 Jun 2017 15:46:38 +0300 (EEST) From: Andy Shevchenko To: Bard Liao , Oder Chiou , Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, John Keeping Date: Thu, 15 Jun 2017 15:46:36 +0300 Message-Id: <20170615124638.65971-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170615124638.65971-1-andriy.shevchenko@linux.intel.com> References: <20170615124638.65971-1-andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko Subject: [alsa-devel] [PATCH v2 1/3] ASoC: rt5677: Introduce proper table for ACPI enumeration 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 I2C devices are enumerated by IDs, and not by instances. Make it clear by using proper module device table for ACPI case. Signed-off-by: Andy Shevchenko --- sound/soc/codecs/rt5677.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 65ac4518ad06..64cf6cc41ad1 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -5030,7 +5030,6 @@ static const struct regmap_config rt5677_regmap = { static const struct i2c_device_id rt5677_i2c_id[] = { { "rt5677", RT5677 }, { "rt5676", RT5676 }, - { "RT5677CE:00", RT5677 }, { } }; MODULE_DEVICE_TABLE(i2c, rt5677_i2c_id); @@ -5041,6 +5040,14 @@ static const struct of_device_id rt5677_of_match[] = { }; MODULE_DEVICE_TABLE(of, rt5677_of_match); +#ifdef CONFIG_ACPI +static const struct acpi_device_id rt5677_acpi_match[] = { + { "RT5677CE", RT5677 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, rt5677_acpi_match); +#endif + static const struct acpi_gpio_params plug_det_gpio = { RT5677_GPIO_PLUG_DET, 0, false }; static const struct acpi_gpio_params mic_present_gpio = { RT5677_GPIO_MIC_PRESENT_L, 0, false }; static const struct acpi_gpio_params headphone_enable_gpio = { RT5677_GPIO_HP_AMP_SHDN_L, 0, false }; @@ -5301,6 +5308,7 @@ static struct i2c_driver rt5677_i2c_driver = { .driver = { .name = "rt5677", .of_match_table = rt5677_of_match, + .acpi_match_table = ACPI_PTR(rt5677_acpi_match), }, .probe = rt5677_i2c_probe, .remove = rt5677_i2c_remove,