mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Bergin <peter@berginkonsult.se>
To: james.schulman@cirrus.com, david.rhodes@cirrus.com,
	tanureal@opensource.cirrus.com, rf@opensource.cirrus.com
Cc: Peter Bergin <peter@berginkonsult.se>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>,
	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	[thread overview]
Message-ID: <20221027115057.442925-1-peter@berginkonsult.se> (raw)

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 <peter@berginkonsult.se>
---
 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},
-- 
2.34.1


             reply	other threads:[~2022-10-27 11:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-27 11:50 Peter Bergin [this message]
2022-10-27 12:31 ` Mark Brown
2022-10-27 22:30 ` kernel test robot
2022-10-27 23:41 ` kernel test robot
2022-10-28  7:50 ` [PATCH v2] ASoC: " Peter Bergin
2022-10-28  9:55   ` Charles Keepax
2022-10-28 10:55   ` Mark Brown
2022-10-28 10:57     ` Peter Bergin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221027115057.442925-1-peter@berginkonsult.se \
    --to=peter@berginkonsult.se \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=david.rhodes@cirrus.com \
    --cc=james.schulman@cirrus.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    --cc=perex@perex.cz \
    --cc=rf@opensource.cirrus.com \
    --cc=tanureal@opensource.cirrus.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®