From patchwork Thu Oct 27 11:50:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Bergin X-Patchwork-Id: 11754 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp183252wru; Thu, 27 Oct 2022 04:55:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7I8fDeSOtYJrydayJ1rpIxdaNCC2Fb1xJ5ssFkwHKxP5LgIcizab6G9OpZoi/7ztkHd6kC X-Received: by 2002:a17:907:808:b0:730:54cc:b597 with SMTP id wv8-20020a170907080800b0073054ccb597mr5387977ejb.434.1666871748258; Thu, 27 Oct 2022 04:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666871748; cv=none; d=google.com; s=arc-20160816; b=mC4RyyEuzvEESmX5or1aUa8sGXScIe5yUAPXIF83r0CLHZk5sHstgyvuqT2K0UCmv7 m4I3lCBpsvt9g2FEV00pXEd/GVatQQCApbc9NdMuiMT6N2lui0AMvZ1t0TfmRBFLtq0Q wKXNRJO/ul/VgxjaHakLEt+QibKX87XMK3iUSl3ZkbT8TbubQ9ePNE2szDH75DZycl4x 1q5UJRfG2u0JLNgXNkxIBLJ9MXmOUbOk4kLL2BH3gjr4wsA/4APglPOP38zei/oON/Rg kAqR0snEFWw5fSzzX4kGMXodSF11IzDwx8815fgZgZnKoa98/r6U13WHaSk64D1wQceT we8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature:dkim-signature; bh=JC/HHWF4gaghp1JRdLxc59f6ipPtlD2CyXsBq4Sp1Sk=; b=OWOD8vDDf+hHj306A6IGs2MNHS+vfNU4ddc/+utnV3ZYkGsTZvKO2Ic0/h2uV1cIRK roetC3vTTY44Gc4bTpWxZ6kWZPmOa2vVaHkhyBZstPlZg7zsJ661fRuARKrqTeMUVe2V IEWA/3vNk5XuXyrGkOF5drUpAG/6X7Tf45tNekl2yCthGgBzeSXTfeF594G/rdJtILOm QSGrjuVSm3PCpsGdAOraxeBf6Vt4g7IiFZi67kW2eBey7Iv6u+QJaW/fuWSS96uA01tR QuVQLdQ2VPHQsPJpWaEgMlfr0XwQcMqMeAmQJEfl3jrzfrpCieUCcp6EsfuhdAkYSkfC CwWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@berginkonsult.se header.s=rsa1 header.b=FL7ERPP2; dkim=neutral (no key) header.i=@berginkonsult.se header.s=ed1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a056402090a00b00461e870df81si1557289edz.620.2022.10.27.04.55.22; Thu, 27 Oct 2022 04:55:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@berginkonsult.se header.s=rsa1 header.b=FL7ERPP2; dkim=neutral (no key) header.i=@berginkonsult.se header.s=ed1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235393AbiJ0Lwr (ORCPT + 99 others); Thu, 27 Oct 2022 07:52:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234933AbiJ0Lwp (ORCPT ); Thu, 27 Oct 2022 07:52:45 -0400 X-Greylist: delayed 61 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 27 Oct 2022 04:52:43 PDT Received: from mailrelay1-1.pub.mailoutpod1-cph3.one.com (mailrelay1-1.pub.mailoutpod1-cph3.one.com [46.30.210.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD1A0A3B54 for ; Thu, 27 Oct 2022 04:52:43 -0700 (PDT) Received: from mailrelay2.pub.mailoutpod2-cph3.one.com (mailrelay2.pub.mailoutpod2-cph3.one.com [104.37.34.7]) by mailrelay1.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPS id b7a39daf-55ed-11ed-a6d5-d0431ea8a283; Thu, 27 Oct 2022 11:51:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=berginkonsult.se; s=rsa1; h=content-transfer-encoding:mime-version:message-id:date:subject:cc:to:from: from; bh=JC/HHWF4gaghp1JRdLxc59f6ipPtlD2CyXsBq4Sp1Sk=; b=FL7ERPP2jG+w/KDqVlq8iIsOMXYp5+kwuyX/Hy4PTBFQFqsMPBLjdz/JjcAJhAlIB9a2xo3CwJUxN +rZ6rKRUDIZrf1o6mS7OHL8pcGn/23WFSJqKYaN/gp4ppfXo51QuvBEgtmIepDtBbD54TFoBRa8dRp HtERZnucLABLL/BpO8igalzhBQ44nntPsY5Ss3hVAJBbVjggwbuTGUd2xSmEgOevimZfqBVbKq63Eb Gg06emRF9cgjsw9o2FnWxUWgCqGM0DE5FQ+qiWpaN1xgZQaXauzgQ/sN4FiLww0ONFTHxkLmDoKqKj l2xr0alXxA2OA2ldcEUxfvQQfKAd4Cg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=berginkonsult.se; s=ed1; h=content-transfer-encoding:mime-version:message-id:date:subject:cc:to:from: from; bh=JC/HHWF4gaghp1JRdLxc59f6ipPtlD2CyXsBq4Sp1Sk=; b=3VKMLIL+XpEr8iGvmz0W5KovJn1ZtaEUXk0s0Gz0lL4KcY9W57xEqlCrOOtV6uNk/C+ynDwQ3NLSh j1pe7nFBQ== X-HalOne-ID: b46a7e99-55ed-11ed-9b66-335755252108 Received: from pbergin-7420.. (ua-213-113-159-147.bbcust.telenor.se [213.113.159.147]) by mailrelay2 (Halon) with ESMTPSA id b46a7e99-55ed-11ed-9b66-335755252108; Thu, 27 Oct 2022 11:51:38 +0000 (UTC) From: Peter Bergin To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com Cc: Peter Bergin , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org Subject: [PATCH] ASoc: cs42xx8-i2c.c: add module device table for of Date: Thu, 27 Oct 2022 13:50:56 +0200 Message-Id: <20221027115057.442925-1-peter@berginkonsult.se> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747841710335076495?= X-GMAIL-MSGID: =?utf-8?q?1747841710335076495?= When trying to connect the device with the driver through of it is not working. The of_device_id is defined in cs42xx8.c but is not correctly included in cs42xx8-i2c.c. Also add the matching table for of in the i2c file. Signed-off-by: Peter Bergin --- sound/soc/codecs/cs42xx8-i2c.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/codecs/cs42xx8-i2c.c b/sound/soc/codecs/cs42xx8-i2c.c index cb06a06d48b0..6e8ee28d01f8 100644 --- a/sound/soc/codecs/cs42xx8-i2c.c +++ b/sound/soc/codecs/cs42xx8-i2c.c @@ -37,6 +37,13 @@ static int cs42xx8_i2c_remove(struct i2c_client *i2c) return 0; } +const struct of_device_id cs42xx8_of_match[] = { + { .compatible = "cirrus,cs42448", .data = &cs42448_data, }, + { .compatible = "cirrus,cs42888", .data = &cs42888_data, }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, cs42xx8_of_match); + static struct i2c_device_id cs42xx8_i2c_id[] = { {"cs42448", (kernel_ulong_t)&cs42448_data}, {"cs42888", (kernel_ulong_t)&cs42888_data},