* [PATCH] ASoC: wm8960: Add ACPI support
@ 2022-04-27 21:29 Nicola Lunghi
2022-04-28 8:24 ` Charles Keepax
2022-04-28 16:46 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Nicola Lunghi @ 2022-04-27 21:29 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai
Cc: Pierre-Louis Bossart, Nicola Lunghi, patches, alsa-devel,
linux-kernel
HID made of either Wolfson/CirrusLogic PCI ID + 8960 identifier
This helps enumerate the Waveshare WM8960 WM8960 Hi-Fi Sound
Card HAT on the Up2 platform.
The scripts at https://github.com/thesofproject/acpi-scripts
can be used to add the ACPI initrd overlay.
This commit is similar to the commit:
960cdd50ca9f ("ASoC: wm8804: Add ACPI support")
Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
---
sound/soc/codecs/wm8960.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c
index ca7660f4bb05..08c87ac16137 100644
--- a/sound/soc/codecs/wm8960.c
+++ b/sound/soc/codecs/wm8960.c
@@ -14,6 +14,7 @@
#include <linux/pm.h>
#include <linux/clk.h>
#include <linux/i2c.h>
+#include <linux/acpi.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -1498,16 +1499,28 @@ static const struct i2c_device_id wm8960_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, wm8960_i2c_id);
+#if defined(CONFIG_OF)
static const struct of_device_id wm8960_of_match[] = {
{ .compatible = "wlf,wm8960", },
{ }
};
MODULE_DEVICE_TABLE(of, wm8960_of_match);
+#endif
+
+#if defined(CONFIG_ACPI)
+static const struct acpi_device_id wm8960_acpi_match[] = {
+ { "1AEC8960", 0 }, /* Wolfson PCI ID + part ID */
+ { "10138960", 0 }, /* Cirrus Logic PCI ID + part ID */
+ { },
+};
+MODULE_DEVICE_TABLE(acpi, wm8960_acpi_match);
+#endif
static struct i2c_driver wm8960_i2c_driver = {
.driver = {
.name = "wm8960",
- .of_match_table = wm8960_of_match,
+ .of_match_table = of_match_ptr(wm8960_of_match),
+ .acpi_match_table = ACPI_PTR(wm8960_acpi_match),
},
.probe = wm8960_i2c_probe,
.remove = wm8960_i2c_remove,
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: wm8960: Add ACPI support
2022-04-27 21:29 [PATCH] ASoC: wm8960: Add ACPI support Nicola Lunghi
@ 2022-04-28 8:24 ` Charles Keepax
2022-04-28 16:46 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Charles Keepax @ 2022-04-28 8:24 UTC (permalink / raw)
To: Nicola Lunghi
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Pierre-Louis Bossart, patches, alsa-devel, linux-kernel
On Wed, Apr 27, 2022 at 10:29:16PM +0100, Nicola Lunghi wrote:
> HID made of either Wolfson/CirrusLogic PCI ID + 8960 identifier
>
> This helps enumerate the Waveshare WM8960 WM8960 Hi-Fi Sound
> Card HAT on the Up2 platform.
>
> The scripts at https://github.com/thesofproject/acpi-scripts
> can be used to add the ACPI initrd overlay.
>
> This commit is similar to the commit:
> 960cdd50ca9f ("ASoC: wm8804: Add ACPI support")
>
> Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
> ---
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Thanks,
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: wm8960: Add ACPI support
2022-04-27 21:29 [PATCH] ASoC: wm8960: Add ACPI support Nicola Lunghi
2022-04-28 8:24 ` Charles Keepax
@ 2022-04-28 16:46 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-04-28 16:46 UTC (permalink / raw)
To: tiwai, nick83ola, lgirdwood, perex
Cc: alsa-devel, linux-kernel, patches, pierre-louis.bossart
On Wed, 27 Apr 2022 22:29:16 +0100, Nicola Lunghi wrote:
> HID made of either Wolfson/CirrusLogic PCI ID + 8960 identifier
>
> This helps enumerate the Waveshare WM8960 WM8960 Hi-Fi Sound
> Card HAT on the Up2 platform.
>
> The scripts at https://github.com/thesofproject/acpi-scripts
> can be used to add the ACPI initrd overlay.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: wm8960: Add ACPI support
commit: 7e0bdbae446ff8a752484f6bcbcd7157e7484158
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-04-28 16:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-27 21:29 [PATCH] ASoC: wm8960: Add ACPI support Nicola Lunghi
2022-04-28 8:24 ` Charles Keepax
2022-04-28 16:46 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox