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: 8366821 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 61D50C0553 for ; Sat, 20 Feb 2016 14:38:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 96A972050E for ; Sat, 20 Feb 2016 14:38:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 6EA00204FF for ; Sat, 20 Feb 2016 14:38:54 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 0C8DA261A76; Sat, 20 Feb 2016 15:38:53 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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 B43F5261519; Sat, 20 Feb 2016 15:38:17 +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 6B9B026151C; Sat, 20 Feb 2016 15:38:16 +0100 (CET) Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by alsa0.perex.cz (Postfix) with ESMTP id D06FB2614A1 for ; Sat, 20 Feb 2016 15:38:06 +0100 (CET) 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 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> 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 Subject: [alsa-devel] [PATCH 2/4] ASoC: wm9713: add device tree support 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 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,