Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6117C433E0 for ; Mon, 25 May 2020 10:14:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2BCD92078B for ; Mon, 25 May 2020 10:14:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="WMUSoZYI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BCD92078B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=nuvoton.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 76BC4171C; Mon, 25 May 2020 12:13:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 76BC4171C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1590401683; bh=jW2dkR8LHX1jA4hheuvq7XJZySLePpqH0ysHXt/+Br0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=WMUSoZYIgoH8CNpmjEsgJc6f1Edmah9zlVzPgGfD+Vz6x3A8Erfi4E0966UvHmZ61 1b7S9X6FW4QM2yU4JEpN8MY+0i+ji/e1tTGhpdkOxz8XOzsDjcml3UyOujWbD/8x6v cvBZ/mR2b8z43tTRe7UGf1QaBZZBFdCobZNiC/Ec= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 03EC7F8016F; Mon, 25 May 2020 12:13:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AEDCBF8021E; Mon, 25 May 2020 12:13:51 +0200 (CEST) Received: from maillog.nuvoton.com (maillog.nuvoton.com [202.39.227.15]) by alsa1.perex.cz (Postfix) with ESMTP id 6FD3EF80149 for ; Mon, 25 May 2020 12:13:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6FD3EF80149 Received: from NTHCCAS04.nuvoton.com (nthccas04.nuvoton.com [10.1.8.28]) by maillog.nuvoton.com (Postfix) with ESMTP id B4DC71C80CD8; Mon, 25 May 2020 18:13:38 +0800 (CST) Received: from NTHCCAS01.nuvoton.com (10.1.9.121) by NTHCCAS04.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 25 May 2020 18:13:38 +0800 Received: from NTHCCAS04.nuvoton.com (10.1.8.28) by NTHCCAS01.nuvoton.com (10.1.9.121) with Microsoft SMTP Server (TLS) id 15.0.1130.7; Mon, 25 May 2020 18:13:38 +0800 Received: from localhost.localdomain (10.4.36.27) by NTHCCAS04.nuvoton.com (10.1.12.25) with Microsoft SMTP Server id 15.1.1847.3 via Frontend Transport; Mon, 25 May 2020 18:13:38 +0800 From: Seven Lee To: Subject: [PATCH] add I2C device and compatible ID Date: Mon, 25 May 2020 18:13:34 +0800 Message-ID: <20200525101335.29130-1-wtli@nuvoton.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain Cc: alsa-devel@alsa-project.org, Seven Lee , lgirdwood@gmail.com, YHCHuang@nuvoton.com, CTLIN0@nuvoton.com, KCHSU0@nuvoton.comgit X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" The nau8810 driver can also compatible with nau8812 and nau8814. Signed-off-by: Seven Lee --- .../devicetree/bindings/sound/nau8812.txt | 16 ++++++++++++++++ .../devicetree/bindings/sound/nau8814.txt | 16 ++++++++++++++++ sound/soc/codecs/nau8810.c | 4 ++++ 3 files changed, 36 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/nau8812.txt create mode 100644 Documentation/devicetree/bindings/sound/nau8814.txt diff --git a/Documentation/devicetree/bindings/sound/nau8812.txt b/Documentation/devicetree/bindings/sound/nau8812.txt new file mode 100644 index 000000000000..7aab29586a1f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nau8812.txt @@ -0,0 +1,16 @@ +NAU8812 audio CODEC + +This device supports I2C only. + +Required properties: + + - compatible : "nuvoton,nau8812" + + - reg : the I2C address of the device. + +Example: + +codec: nau8812@1a { + compatible = "nuvoton,nau8812"; + reg = <0x1a>; +}; diff --git a/Documentation/devicetree/bindings/sound/nau8814.txt b/Documentation/devicetree/bindings/sound/nau8814.txt new file mode 100644 index 000000000000..24bf2ba3d23b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nau8814.txt @@ -0,0 +1,16 @@ +NAU8814 audio CODEC + +This device supports I2C only. + +Required properties: + + - compatible : "nuvoton,nau8814" + + - reg : the I2C address of the device. + +Example: + +codec: nau8814@1a { + compatible = "nuvoton,nau8814"; + reg = <0x1a>; +}; diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c index efe9fb3fb225..33ebc6398426 100644 --- a/sound/soc/codecs/nau8810.c +++ b/sound/soc/codecs/nau8810.c @@ -895,6 +895,8 @@ static int nau8810_i2c_probe(struct i2c_client *i2c, static const struct i2c_device_id nau8810_i2c_id[] = { { "nau8810", 0 }, + { "nau8812", 0 }, + { "nau8814", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, nau8810_i2c_id); @@ -902,6 +904,8 @@ MODULE_DEVICE_TABLE(i2c, nau8810_i2c_id); #ifdef CONFIG_OF static const struct of_device_id nau8810_of_match[] = { { .compatible = "nuvoton,nau8810", }, + { .compatible = "nuvoton,nau8812", }, + { .compatible = "nuvoton,nau8814", }, { } }; MODULE_DEVICE_TABLE(of, nau8810_of_match); -- 2.26.2