From patchwork Sat Feb 20 14:37:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Jarzmik X-Patchwork-Id: 8366881 Return-Path: X-Original-To: patchwork-linux-arm@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 D874CC0554 for ; Sat, 20 Feb 2016 14:40:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15FCE20511 for ; Sat, 20 Feb 2016 14:40:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA9712050E for ; Sat, 20 Feb 2016 14:40:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aX8g6-0001K9-4S; Sat, 20 Feb 2016 14:38:34 +0000 Received: from smtp08.smtpout.orange.fr ([80.12.242.130] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aX8g1-0001GW-DD for linux-arm-kernel@lists.infradead.org; Sat, 20 Feb 2016 14:38:30 +0000 Received: from belgarion.home ([109.222.195.191]) by mwinf5d68 with ME id Lee01s00548EqBx03ee5s2; Sat, 20 Feb 2016 15:38:06 +0100 X-ME-Helo: belgarion.home X-ME-Date: Sat, 20 Feb 2016 15:38:06 +0100 X-ME-IP: 109.222.195.191 From: Robert Jarzmik To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Subject: [PATCH 2/4] ASoC: wm9713: add device tree support Date: Sat, 20 Feb 2016 15:37:57 +0100 Message-Id: <1455979079-9030-2-git-send-email-robert.jarzmik@free.fr> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455979079-9030-1-git-send-email-robert.jarzmik@free.fr> References: <1455979079-9030-1-git-send-email-robert.jarzmik@free.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160220_063829_853893_CF167555 X-CRM114-Status: GOOD ( 12.06 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add the code to be able to use this codec in a devicetree platform. This is tested with the zylonite pxa310 board. Signed-off-by: Robert Jarzmik --- sound/soc/codecs/wm9713.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 79e143625ac3..4e522302bb8a 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1272,9 +1272,19 @@ static int wm9713_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id wm9713_dt_ids[] = { + { .compatible = "wlf,wm9713", }, + { } +}; +MODULE_DEVICE_TABLE(of, wm9713_dt_ids); + +#endif + static struct platform_driver wm9713_codec_driver = { .driver = { .name = "wm9713-codec", + .of_match_table = of_match_ptr(wm9713_dt_ids), }, .probe = wm9713_probe,