1 From 683a8077f54a254142f693f8c2a2de25cbbad260 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 28 Mar 2024 12:13:55 +0000
4 Subject: ALSA: hda: cs35l56: Add ACPI device match tables
6 From: Simon Trimmer <simont@opensource.cirrus.com>
8 [ Upstream commit 2d0401ee38d43ab0e4cdd02dfc9d402befb2b5c8 ]
10 Adding the ACPI HIDs to the match table triggers the cs35l56-hda modules
11 to be loaded on boot so that Serial Multi Instantiate can add the
12 devices to the bus and begin the driver init sequence.
14 Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
15 Fixes: 73cfbfa9caea ("ALSA: hda/cs35l56: Add driver for Cirrus Logic CS35L56 amplifier")
16 Message-ID: <20240328121355.18972-1-simont@opensource.cirrus.com>
17 Signed-off-by: Takashi Iwai <tiwai@suse.de>
18 Signed-off-by: Sasha Levin <sashal@kernel.org>
20 sound/pci/hda/cs35l56_hda_i2c.c | 13 +++++++++++--
21 sound/pci/hda/cs35l56_hda_spi.c | 13 +++++++++++--
22 2 files changed, 22 insertions(+), 4 deletions(-)
24 diff --git a/sound/pci/hda/cs35l56_hda_i2c.c b/sound/pci/hda/cs35l56_hda_i2c.c
25 index 757a4d193e0fb..c31f60b0421e5 100644
26 --- a/sound/pci/hda/cs35l56_hda_i2c.c
27 +++ b/sound/pci/hda/cs35l56_hda_i2c.c
28 @@ -49,10 +49,19 @@ static const struct i2c_device_id cs35l56_hda_i2c_id[] = {
32 +static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
38 +MODULE_DEVICE_TABLE(acpi, cs35l56_acpi_hda_match);
40 static struct i2c_driver cs35l56_hda_i2c_driver = {
42 - .name = "cs35l56-hda",
43 - .pm = &cs35l56_hda_pm_ops,
44 + .name = "cs35l56-hda",
45 + .acpi_match_table = cs35l56_acpi_hda_match,
46 + .pm = &cs35l56_hda_pm_ops,
48 .id_table = cs35l56_hda_i2c_id,
49 .probe = cs35l56_hda_i2c_probe,
50 diff --git a/sound/pci/hda/cs35l56_hda_spi.c b/sound/pci/hda/cs35l56_hda_spi.c
51 index 756aec342eab7..52c9e04b3c55f 100644
52 --- a/sound/pci/hda/cs35l56_hda_spi.c
53 +++ b/sound/pci/hda/cs35l56_hda_spi.c
54 @@ -49,10 +49,19 @@ static const struct spi_device_id cs35l56_hda_spi_id[] = {
58 +static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
64 +MODULE_DEVICE_TABLE(acpi, cs35l56_acpi_hda_match);
66 static struct spi_driver cs35l56_hda_spi_driver = {
68 - .name = "cs35l56-hda",
69 - .pm = &cs35l56_hda_pm_ops,
70 + .name = "cs35l56-hda",
71 + .acpi_match_table = cs35l56_acpi_hda_match,
72 + .pm = &cs35l56_hda_pm_ops,
74 .id_table = cs35l56_hda_spi_id,
75 .probe = cs35l56_hda_spi_probe,