From patchwork Thu Feb 7 13:31:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10801241 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E47A813B4 for ; Thu, 7 Feb 2019 13:32:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D2BA92D6DE for ; Thu, 7 Feb 2019 13:32:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5C9A2D6E1; Thu, 7 Feb 2019 13:32:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59B372D6DE for ; Thu, 7 Feb 2019 13:32:24 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C7EA02679C5; Thu, 7 Feb 2019 14:32:14 +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 37C7B2679CD; Thu, 7 Feb 2019 14:32:12 +0100 (CET) Received: from crapouillou.net (outils.crapouillou.net [89.234.176.41]) by alsa0.perex.cz (Postfix) with ESMTP id 555862679B8 for ; Thu, 7 Feb 2019 14:32:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1549546329; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=0TYmKriPQWetiVQTiupkGvMhIDeyKodtmIfFaz7WP5E=; b=CFq90kkhemNltECsgk3lLvGD3Ze8TVyazXO1GYcmE8vsf0Sal1ptprmGzBrG7GP5+JZ7QF 0jar96VjDSvMY+MjiE4SxD3IP1P8KRDlWjYd/HzNELRHIAmcMGRWeHeErImEd0+XmokkIV azMHSTGGHAp1Htp4qayH8BXuk+tTIUw= From: Paul Cercueil To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , Jaroslav Kysela , Takashi Iwai Date: Thu, 7 Feb 2019 10:31:41 -0300 Message-Id: <20190207133143.5232-4-paul@crapouillou.net> In-Reply-To: <20190207133143.5232-1-paul@crapouillou.net> References: <20190207133143.5232-1-paul@crapouillou.net> Cc: Paul Cercueil , devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v2 4/6] ASoC: codecs: jz4740: Add support for devicetree 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 support for probing the driver from devicetree. Signed-off-by: Paul Cercueil --- Changes: v2: No change sound/soc/codecs/jz4740.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 9b3e1227a971..974e17fa1911 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -346,10 +346,19 @@ static int jz4740_codec_probe(struct platform_device *pdev) return ret; } +#ifdef CONFIG_OF +static const struct of_device_id jz4740_codec_of_matches[] = { + { .compatible = "ingenic,jz4740-codec", }, + { } +}; +MODULE_DEVICE_TABLE(of, jz4740_codec_of_matches); +#endif + static struct platform_driver jz4740_codec_driver = { .probe = jz4740_codec_probe, .driver = { .name = "jz4740-codec", + .of_match_table = of_match_ptr(jz4740_codec_of_matches), }, };