Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoc: cs42xx8-i2c.c: add module device table for of
@ 2022-10-27 11:50 Peter Bergin
  2022-10-27 12:31 ` Mark Brown
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Peter Bergin @ 2022-10-27 11:50 UTC (permalink / raw)
  To: james.schulman, david.rhodes, tanureal, rf
  Cc: alsa-devel, Peter Bergin, Takashi Iwai, Liam Girdwood, Mark Brown,
	patches, linux-kernel

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-31  6:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-27 11:50 [PATCH] ASoc: cs42xx8-i2c.c: add module device table for of Peter Bergin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox