]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/6.6.26/alsa-hda-cs35l56-add-acpi-device-match-tables.patch
Linux 6.1.85
[thirdparty/kernel/stable-queue.git] / releases / 6.6.26 / alsa-hda-cs35l56-add-acpi-device-match-tables.patch
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
5
6 From: Simon Trimmer <simont@opensource.cirrus.com>
7
8 [ Upstream commit 2d0401ee38d43ab0e4cdd02dfc9d402befb2b5c8 ]
9
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.
13
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>
19 ---
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(-)
23
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[] = {
29 {}
30 };
31
32 +static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
33 + { "CSC3554", 0 },
34 + { "CSC3556", 0 },
35 + { "CSC3557", 0 },
36 + {}
37 +};
38 +MODULE_DEVICE_TABLE(acpi, cs35l56_acpi_hda_match);
39 +
40 static struct i2c_driver cs35l56_hda_i2c_driver = {
41 .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,
47 },
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[] = {
55 {}
56 };
57
58 +static const struct acpi_device_id cs35l56_acpi_hda_match[] = {
59 + { "CSC3554", 0 },
60 + { "CSC3556", 0 },
61 + { "CSC3557", 0 },
62 + {}
63 +};
64 +MODULE_DEVICE_TABLE(acpi, cs35l56_acpi_hda_match);
65 +
66 static struct spi_driver cs35l56_hda_spi_driver = {
67 .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,
73 },
74 .id_table = cs35l56_hda_spi_id,
75 .probe = cs35l56_hda_spi_probe,
76 --
77 2.43.0
78