From patchwork Mon May 25 10:13:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seven Lee X-Patchwork-Id: 11568519 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B964913B4 for ; Mon, 25 May 2020 10:14:42 +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 B3D992078B for ; Mon, 25 May 2020 10:14:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="fTXIKnfV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3D992078B 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 8A80E1723; Mon, 25 May 2020 12:13:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8A80E1723 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1590401679; bh=jW2dkR8LHX1jA4hheuvq7XJZySLePpqH0ysHXt/+Br0=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=fTXIKnfVxHhYeh3c2G7L/dcY8z0wiHtWc/MlmBt62gT2NWChTcfOh3i83kxifUMr8 7RbtFvV2JUplMNvhLjgALF6Kcrf79/3MiMk4+mWTEa2bxWYSsEKdfUVXRhopi2RONU owJjR4ePd6IxCLU9pG8DVuAPqIeZb9hL3W/Y+3Gc= 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) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id AEDCBF8021E; Mon, 25 May 2020 12:13:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 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 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);