From patchwork Mon Dec 21 13:18:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Caesar Wang X-Patchwork-Id: 7895861 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id B09AEBEEE5 for ; Mon, 21 Dec 2015 13:18:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE40F20567 for ; Mon, 21 Dec 2015 13:18:54 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id C98572055D for ; Mon, 21 Dec 2015 13:18:53 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E74D8265347; Mon, 21 Dec 2015 14:18:50 +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=-2.6 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id BCD6B265268; Mon, 21 Dec 2015 14:18:40 +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 7A9002652AD; Mon, 21 Dec 2015 14:18:37 +0100 (CET) Received: from mail-pf0-f181.google.com (mail-pf0-f181.google.com [209.85.192.181]) by alsa0.perex.cz (Postfix) with ESMTP id 159C126523B for ; Mon, 21 Dec 2015 14:18:30 +0100 (CET) Received: by mail-pf0-f181.google.com with SMTP id u7so42330643pfb.1 for ; Mon, 21 Dec 2015 05:18:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=ksvYFPWDSxida6d1JZqMEoKWxo3DHDMQAz7liTdJU88=; b=e/Hq6R4+rMhRk6NJ8/XBOJGl3+G2yVxxnTZL3Qd8ZpkrsLHncaVYtdUiYRPIFNK2cZ SizSaLhErgjajnJCI11Jj5OIOZmxudXHEcsUyFhIyK90CkvwNdwhYgX+b0N3PbsH9zgR s17TwrmJDxCidmhf6NCxt79NFI9ybwwUhJe0/iaVbQVR2JDhjFFtEJXAYQD/nNBFxXvn +fEBv1bv+ipjOeSq/UIFKjZhUWcsy3SeFBd5nv3D25/u10T7LSQjmo87ibhOEqlTHSlq rWc0k93Dmz0pDdjxWxDPXyKGXPa/o2afx0tZf+nEbgNx+XZ0voz6P2CKVASPlot8C+5o ui6g== X-Received: by 10.98.10.137 with SMTP id 9mr11070075pfk.37.1450703908375; Mon, 21 Dec 2015 05:18:28 -0800 (PST) Received: from localhost.localdomain ([103.29.142.67]) by smtp.gmail.com with ESMTPSA id 7sm21717194pfn.83.2015.12.21.05.18.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 21 Dec 2015 05:18:27 -0800 (PST) From: Caesar Wang To: robh+dt@kernel.org, broonie@kernel.org Date: Mon, 21 Dec 2015 21:18:13 +0800 Message-Id: <1450703894-32623-1-git-send-email-wxt@rock-chips.com> X-Mailer: git-send-email 1.9.1 Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, heiko@sntech.de, linux-kernel@vger.kernel.org, bardliao@realtek.com, wxt@rock-chips.com Subject: [alsa-devel] [PATCH 1/2] ASoC: rt5616: add an of_match 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 Add a device tree match table. This serves to make the driver's support of device tree more explicit. Signed-off-by: Caesar Wang --- sound/soc/codecs/rt5616.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c index f4005cb..e01a32d 100644 --- a/sound/soc/codecs/rt5616.c +++ b/sound/soc/codecs/rt5616.c @@ -1287,6 +1287,14 @@ static const struct i2c_device_id rt5616_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, rt5616_i2c_id); +#if defined(CONFIG_OF) +static const struct of_device_id rt5616_of_match[] = { + { .compatible = "realtek,rt5616", }, + {}, +}; +MODULE_DEVICE_TABLE(of, rt5616_of_match); +#endif + static int rt5616_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *id) { @@ -1359,6 +1367,7 @@ static void rt5616_i2c_shutdown(struct i2c_client *client) static struct i2c_driver rt5616_i2c_driver = { .driver = { .name = "rt5616", + .of_match_table = of_match_ptr(rt5616_of_match), }, .probe = rt5616_i2c_probe, .remove = rt5616_i2c_remove,