From patchwork Thu Aug 13 12:12:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricard Wanderlof X-Patchwork-Id: 7008181 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3519D9F44C for ; Thu, 13 Aug 2015 12:12:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E58D200E1 for ; Thu, 13 Aug 2015 12:12:58 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 822B52028D for ; Thu, 13 Aug 2015 12:12:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1A6DC261ACD; Thu, 13 Aug 2015 14:12:54 +0200 (CEST) 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, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id AA093261A03; Thu, 13 Aug 2015 14:12:45 +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 52F5A261A5A; Thu, 13 Aug 2015 14:12:44 +0200 (CEST) Received: from bes.se.axis.com (bes.se.axis.com [195.60.68.10]) by alsa0.perex.cz (Postfix) with ESMTP id 283362619F5 for ; Thu, 13 Aug 2015 14:12:39 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by bes.se.axis.com (Postfix) with ESMTP id CA6092E506 for ; Thu, 13 Aug 2015 14:12:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bes.se.axis.com Received: from bes.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bes.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id AsBtMGmqrRBw for ; Thu, 13 Aug 2015 14:12:31 +0200 (CEST) Received: from boulder.se.axis.com (boulder.se.axis.com [10.0.2.104]) by bes.se.axis.com (Postfix) with ESMTP id 5CC982E5C2 for ; Thu, 13 Aug 2015 14:12:26 +0200 (CEST) Received: from boulder.se.axis.com (localhost [127.0.0.1]) by postfix.imss71 (Postfix) with ESMTP id 9EEE51404 for ; Thu, 13 Aug 2015 14:12:26 +0200 (CEST) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by boulder.se.axis.com (Postfix) with ESMTP id 93253F9D for ; Thu, 13 Aug 2015 14:12:26 +0200 (CEST) Received: from xmail2.se.axis.com (xmail2.se.axis.com [10.0.5.74]) by thoth.se.axis.com (Postfix) with ESMTP id 8FF5134005 for ; Thu, 13 Aug 2015 14:12:26 +0200 (CEST) Received: from lnxricardw1.se.axis.com (10.88.7.2) by xmail2.se.axis.com (10.0.5.74) with Microsoft SMTP Server (TLS) id 8.3.342.0; Thu, 13 Aug 2015 14:12:26 +0200 Date: Thu, 13 Aug 2015 14:12:26 +0200 From: Ricard Wanderlof X-X-Sender: ricardw@lnxricardw1.se.axis.com To: "alsa-devel@alsa-project.org" Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Subject: [alsa-devel] [PATCH] Add rudimentary device tree support for SSM2518 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP For some reason the SSM2518 codec driver doesn't have DT support, even though there are bindings described for it in Documentation/devicetree/sound/ssm2518.txt . This patch adds rudimentary DT support for the compatible property which is a step forward. Signed-off-by: Ricard Wanderlof --- sound/soc/codecs/ssm2518.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c index 67ea55a..ecf9996 100644 --- a/sound/soc/codecs/ssm2518.c +++ b/sound/soc/codecs/ssm2518.c @@ -811,6 +810,14 @@ static int ssm2518_i2c_remove(struct i2c_client *client) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id ssm2518_dt_ids[] = { + { .compatible = "adi,ssm2518", }, + { } +}; +MODULE_DEVICE_TABLE(of, ssm2518_dt_ids); +#endif + static const struct i2c_device_id ssm2518_i2c_ids[] = { { "ssm2518", 0 }, { } @@ -821,6 +828,9 @@ static struct i2c_driver ssm2518_driver = { .driver = { .name = "ssm2518", .owner = THIS_MODULE, +#ifdef CONFIG_OF + .of_match_table = of_match_ptr(ssm2518_dt_ids), +#endif }, .probe = ssm2518_i2c_probe, .remove = ssm2518_i2c_remove,