From patchwork Tue Feb 5 03:11:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 10796829 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 AC5FE17FB for ; Tue, 5 Feb 2019 03:12:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9962C2AC30 for ; Tue, 5 Feb 2019 03:12:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D8C02B498; Tue, 5 Feb 2019 03:12:10 +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 265462AC30 for ; Tue, 5 Feb 2019 03:12:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 841612675B6; Tue, 5 Feb 2019 04:11:59 +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 B95FC267783; Tue, 5 Feb 2019 04:11:53 +0100 (CET) Received: from crapouillou.net (outils.crapouillou.net [89.234.176.41]) by alsa0.perex.cz (Postfix) with ESMTP id E5D512675AA for ; Tue, 5 Feb 2019 04:11:49 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1549336309; 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=1KQuKdC3HXzixy/88R1T0mNoaMsOo5uU9Ul/2C3K/hY=; b=R/BUeeHW5AmYiDvCEnDSI6n6EzpZ3edc576BaJyKj1aNi2+V896G9k12XLCoU6A5wX4g33 Lx6A0bVZPwamR0kZCinmce+BuJOnlglnfZe3oGhbRIbV3O2X9BVndT3WrMTvLlWpYVMXaG yLJn8WvBE7YZb9W1T1vXus9fWlV4ryo= From: Paul Cercueil To: Liam Girdwood , Mark Brown , Rob Herring , Mark Rutland , Jaroslav Kysela , Takashi Iwai Date: Tue, 5 Feb 2019 00:11:06 -0300 Message-Id: <20190205031108.26171-4-paul@crapouillou.net> In-Reply-To: <20190205031108.26171-1-paul@crapouillou.net> References: <20190205031108.26171-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 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 --- 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 af57a7d6ec12..b5a1323f0883 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -347,10 +347,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), }, };