Skip to contentSkip to conversation

ASoC: rt1015p: add acpi device id for rt1015p

PATCH Superseded [email protected] 3 participants 7 messages Feb 26, 2021 – Mar 12, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt1015p: add acpi device id for rt1015p

From: Jack Yu <[email protected]>

Add acpi device id for rt1015p.

---
 sound/soc/codecs/rt1015p.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
sound/soc/codecs/rt1015p.c +10 -0
index 671f2a2130fe..61694de080e6 100644
@@ -4,6 +4,7 @@
 //
 // Copyright 2020 The Linux Foundation. All rights reserved.
 
+#include <linux/acpi.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/err.h>
@@ -130,10 +131,19 @@ static const struct of_device_id rt1015p_device_id[] = {
 MODULE_DEVICE_TABLE(of, rt1015p_device_id);
 #endif
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rt1015p_acpi_match[] = {
+	{ "ALCP1015", 0},
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, rt1015p_acpi_match);
+#endif
+
 static struct platform_driver rt1015p_platform_driver = {
 	.driver = {
 		.name = "rt1015p",
 		.of_match_table = of_match_ptr(rt1015p_device_id),
+		.acpi_match_table = ACPI_PTR(rt1015p_acpi_match),
 	},
 	.probe = rt1015p_platform_probe,
 };
Signature · 1 line
2.29.0
#1 lore raw
Quoted 22 lines · On 2/25/21 8:05 PM, [email protected] wrote:

From: Jack Yu <[email protected]>

Add acpi device id for rt1015p.

---
  sound/soc/codecs/rt1015p.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
sound/soc/codecs/rt1015p.c +1 -0
index 671f2a2130fe..61694de080e6 100644
@@ -4,6 +4,7 @@
  //
  // Copyright 2020 The Linux Foundation. All rights reserved.
 
+#include <linux/acpi.h>
  #include <linux/delay.h>
  #include <linux/device.h>
  #include <linux/err.h>

sound/soc/codecs/rt1015p.c static const struct of_device_id rt1015p_device_id[] = { · line 136

Quoted 6 lines
sound/soc/codecs/rt1015p.c +3 -0
@@ -130,10 +131,19 @@ static const struct of_device_id rt1015p_device_id[] = {
  MODULE_DEVICE_TABLE(of, rt1015p_device_id);
  #endif
 
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rt1015p_acpi_match[] = {
+	{ "ALCP1015", 0},

This isn't much better, ALC is not a vendor ID as defined by https://uefi.org/PNP_ACPI_Registry

I've ask for guidance from Intel ACPI folks on this, please stay tuned.

Quoted 14 lines
sound/soc/codecs/rt1015p.c +6 -0
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, rt1015p_acpi_match);
+#endif
+
  static struct platform_driver rt1015p_platform_driver = {
  	.driver = {
  		.name = "rt1015p",
  		.of_match_table = of_match_ptr(rt1015p_device_id),
+		.acpi_match_table = ACPI_PTR(rt1015p_acpi_match),
  	},
  	.probe = rt1015p_platform_probe,
  };
author
#2 lore raw
Quoted 39 lines

-----Original Message-----
From: Pierre-Louis Bossart <[email protected]>
Sent: Saturday, February 27, 2021 5:48 AM
To: Jack Yu <[email protected]>; [email protected]; [email protected]
Cc: Oder Chiou <[email protected]>; [email protected]; [email protected]; [email protected] [陳建宏] <[email protected]>; 陳昶志 <[email protected]>; Derek [方德 義] <[email protected]>; Shuming [范書銘] <[email protected]>; Flove(HsinFu) <[email protected]>
Subject: Re: [PATCH] ASoC: rt1015p: add acpi device id for rt1015p

sound/soc/codecs/rt1015p.c static const struct of_device_id

Quoted 22 lines · On 2/25/21 8:05 PM, [email protected] wrote:

From: Jack Yu <[email protected]>

Add acpi device id for rt1015p.

---
  sound/soc/codecs/rt1015p.c | 10 ++++++++++
  1 file changed, 10 insertions(+)
sound/soc/codecs/rt1015p.c +1 -0
index 671f2a2130fe..61694de080e6 100644
@@ -4,6 +4,7 @@
  //
  // Copyright 2020 The Linux Foundation. All rights reserved.
 
+#include <linux/acpi.h>
  #include <linux/delay.h>
  #include <linux/device.h>
  #include <linux/err.h>
@@ -130,10 +131,19 @@ static const struct of_device_id

rt1015p_device_id[] = {

Quoted 3 lines
sound/soc/codecs/rt1015p.c +0 -0
  MODULE_DEVICE_TABLE(of, rt1015p_device_id);
  #endif
 
Quoted 9 lines

sound/soc/codecs/rt1015p.c static const struct of_device_id rt1015p_device_id[] = { · line 136

Quoted 3 lines
sound/soc/codecs/rt1015p.c +3 -0
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rt1015p_acpi_match[] = {
+	{ "ALCP1015", 0},

This isn't much better, ALC is not a vendor ID as defined by
https://uefi.org/PNP_ACPI_Registry

I've ask for guidance from Intel ACPI folks on this, please stay tuned.

Hi Pierre,

Is there any update from Intel ACPI team regarding to this ID format issue?

BR,
Jack

Quoted 15 lines

sound/soc/codecs/rt1015p.c static const struct of_device_id rt1015p_device_id[] = { · line 149

Quoted 13 lines
sound/soc/codecs/rt1015p.c +5 -0
+	{ },
+};
+MODULE_DEVICE_TABLE(acpi, rt1015p_acpi_match); #endif
+
  static struct platform_driver rt1015p_platform_driver = {
  	.driver = {
  		.name = "rt1015p",
  		.of_match_table = of_match_ptr(rt1015p_device_id),
+		.acpi_match_table = ACPI_PTR(rt1015p_acpi_match),
  	},
  	.probe = rt1015p_platform_probe,
  };

------Please consider the environment before printing this e-mail.

#3 lore raw
Quoted 9 lines
Quoted 9 lines

sound/soc/codecs/rt1015p.c static const struct of_device_id rt1015p_device_id[] = { · line 136

Quoted 5 lines
sound/soc/codecs/rt1015p.c +3 -0
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rt1015p_acpi_match[] = {
+	{ "ALCP1015", 0},

This isn't much better, ALC is not a vendor ID as defined by
https://uefi.org/PNP_ACPI_Registry

Quoted 6 lines
Quoted 2 lines

I've ask for guidance from Intel ACPI folks on this, please stay tuned.

Hi Pierre,

Is there any update from Intel ACPI team regarding to this ID format issue?

Sorry about the delay.

It seems that the options are limited. The HID needs to be made of two parts, vendor ID and part ID.

For the vendor ID, you may use the PNP ID (RTL) or the PCI ID (10EC).

For the part ID, you are limited to 4 hex-digits. I didn't get any positive answers on how to support '1015P', the only solution seems to be to create a new part number, or detect at run-time which of the '1015' skews is actually used.

author
#4 lore raw
Quoted 16 lines
Quoted 7 lines
Quoted 7 lines

sound/soc/codecs/rt1015p.c static const struct of_device_id rt1015p_device_id[] = { · line 136

Quoted 3 lines
sound/soc/codecs/rt1015p.c +3 -0
+#ifdef CONFIG_ACPI
+static const struct acpi_device_id rt1015p_acpi_match[] = {
+	{ "ALCP1015", 0},

This isn't much better, ALC is not a vendor ID as defined by
https://uefi.org/PNP_ACPI_Registry

Quoted 6 lines
Quoted 2 lines

I've ask for guidance from Intel ACPI folks on this, please stay tuned.

Hi Pierre,

Is there any update from Intel ACPI team regarding to this ID format issue?

Sorry about the delay.

Quoted 9 lines

It seems that the options are limited. The HID needs to be made of two parts, vendor ID and part ID.

For the vendor ID, you may use the PNP ID (RTL) or the PCI ID (10EC).

For the part ID, you are limited to 4 hex-digits. I didn't get any positive answers on how to support '1015P', the only solution seems to be to create a new part number, or detect at run-time which of the '1015' skews is actually used.

Actually this driver is also used for rt1015 IC, the only difference is that rt1015.c is for i2c mode
and rt1015p is for non-i2c mode of rt1015 IC, so I think it's ok to use the same part ID (different vendor ID) for two drivers. How do you think if we use "RTL1015" instead?

#5 lore raw
Quoted 6 lines
Quoted 6 lines

It seems that the options are limited. The HID needs to be made of two parts, vendor ID and part ID.

For the vendor ID, you may use the PNP ID (RTL) or the PCI ID (10EC).

Quoted 8 lines
Quoted 4 lines

For the part ID, you are limited to 4 hex-digits. I didn't get any positive answers on how to support '1015P', the only solution seems to be to create a new part number, or detect at run-time which of the '1015' skews is actually used.

Actually this driver is also used for rt1015 IC, the only difference is that rt1015.c is for i2c mode
and rt1015p is for non-i2c mode of rt1015 IC, so I think it's ok to use the same part ID (different vendor ID) for two drivers. How do you think if we use "RTL1015" instead?

that would work indeed, e.g. 10EC1015 refers to the I2C version and RTL1015 to the non-I2C version. Thanks!

maintainer
#6 lore raw
In reply to [email protected]
Quoted 1 line · On Fri, 26 Feb 2021 10:05:17 +0800, [email protected] wrote:

Add acpi device id for rt1015p.

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: rt1015p: add acpi device id for rt1015p

      commit: 464b489a7885d6a89b0dfa7b7f1f56e2db80700d

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