From patchwork Fri Nov 14 07:51:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Mengdong" X-Patchwork-Id: 5303941 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C97FB9F2ED for ; Fri, 14 Nov 2014 07:45:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 09AD7201BC for ; Fri, 14 Nov 2014 07:45:32 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 07A082017D for ; Fri, 14 Nov 2014 07:45:31 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7D629266566; Fri, 14 Nov 2014 08:45:29 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 3BE19266514; Fri, 14 Nov 2014 08:45:19 +0100 (CET) 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 15D5B26651B; Fri, 14 Nov 2014 08:45:18 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id 9385126650F for ; Fri, 14 Nov 2014 08:45:09 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 13 Nov 2014 23:42:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,384,1413270000"; d="scan'208";a="607706520" Received: from amanda-hsw-pc.sh.intel.com ([10.239.37.16]) by orsmga001.jf.intel.com with ESMTP; 13 Nov 2014 23:45:05 -0800 From: mengdong.lin@intel.com To: alsa-devel@alsa-project.org, broonie@kernel.org, bardliao@realtek.com Date: Fri, 14 Nov 2014 15:51:34 +0800 Message-Id: <7008ba4e47e5b26da2114bfbc65b634e4c409212.1415951477.git.mengdong.lin@intel.com> X-Mailer: git-send-email 1.9.1 Cc: Mengdong Lin Subject: [alsa-devel] [PATCH] ASoC: rt5670 : Add ACPI match ID for Intel CHT/BSW platforms 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: Mengdong Lin This patch adds the ACPI match ID for rt5670/5672 codec. So on Intel CherryTrail/Braswell platforms, the codec can be enumerated from ACPI and depends on ACPI to get platform-specific info and power saving. Signed-off-by: Mengdong Lin Reviewed-by: Bard Liao diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c index c4c42d5..fd32501 100644 --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -2503,6 +2504,14 @@ static const struct i2c_device_id rt5670_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id); +#ifdef CONFIG_ACPI +static struct acpi_device_id rt5670_acpi_match[] = { + { "10EC5670", 0}, + { }, +}; +MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match); +#endif + static int rt5670_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -2691,6 +2700,7 @@ static struct i2c_driver rt5670_i2c_driver = { .driver = { .name = "rt5670", .owner = THIS_MODULE, + .acpi_match_table = ACPI_PTR(rt5670_acpi_match), }, .probe = rt5670_i2c_probe, .remove = rt5670_i2c_remove,