Skip to contentSkip to conversation

ASoC: codecs: Update device_id tables for Realtek drivers

PATCH Superseded Cezary Rojewski 4 participants 37 messages Feb 20, 2025 – Feb 27, 2025

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ASoC: codecs: Update device_id tables for Realtek drivers

The series aims to streamline the formatting for ACPI IDs so that a single pattern can be used to identify the device.

Work implicitly suggested by Andy Shevchenko - reading and learning from number of his reviews on the Linux mailing lists.

Several formats do exists, however, after technical discussion PCI-based format has been selected as the recommended one. For Realtek devices, it is going to be 10ECxxxx where 10EC unambiguously identifies Realtek company whereas the following 4 hexes specify the PART_ID i.e.: the device.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

Patches sorted into two groups:
- fixes, no functional changes
- updates: fix + addition of new ACPI ID entries

Cezary Rojewski (24):
ASoC: codecs: rt1011: Fix definition of device_id tables
ASoC: codecs: rt1015: Fix definition of device_id tables
ASoC: codecs: rt1016: Fix definition of device_id tables
ASoC: codecs: rt1019: Fix definition of device_id tables
ASoC: codecs: rt1305: Fix definition of device_id tables
ASoC: codecs: rt1308: Fix definition of device_id tables
ASoC: codecs: rt1318: Fix definition of device_id tables
ASoC: codecs: rt274: Fix definition of device_id tables
ASoC: codecs: rt5514: Fix definition of device_id tables
ASoC: codecs: rt5640: Fix definition of device_id tables
ASoC: codecs: rt5645: Fix definition of device_id tables
ASoC: codecs: rt5651: Fix definition of device_id tables
ASoC: codecs: rt5659: Fix definition of device_id tables
ASoC: codecs: rt5660: Fix definition of device_id tables
ASoC: codecs: rt5663: Fix definition of device_id tables
ASoC: codecs: rt5665: Fix definition of device_id tables
ASoC: codecs: rt5668: Fix definition of device_id tables
ASoC: codecs: rt5670: Fix definition of device_id tables
ASoC: codecs: rt5682: Fix definition of device_id tables
ASoC: codecs: rt1015p: Update definition of device_id tables
ASoC: codecs: rt286: Update definition of device_id tables
ASoC: codecs: rt298: Update definition of device_id tables
ASoC: codecs: rt5677: Update definition of device_id tables
ASoC: codecs: rt5682s: Update definition of device_id tables

 sound/soc/codecs/rt1011.c     |  6 +++---
 sound/soc/codecs/rt1015.c     |  6 +++---
 sound/soc/codecs/rt1015p.c    |  8 +++++---
 sound/soc/codecs/rt1016.c     |  6 +++---
 sound/soc/codecs/rt1019.c     |  6 +++---
 sound/soc/codecs/rt1305.c     |  6 +++---
 sound/soc/codecs/rt1308.c     |  6 +++---
 sound/soc/codecs/rt1318.c     |  6 +++---
 sound/soc/codecs/rt274.c      |  8 ++++----
 sound/soc/codecs/rt286.c      |  5 +++--
 sound/soc/codecs/rt298.c      |  5 +++--
 sound/soc/codecs/rt5514.c     |  6 +++---
 sound/soc/codecs/rt5640.c     | 14 +++++++-------
 sound/soc/codecs/rt5645.c     | 12 ++++++------
 sound/soc/codecs/rt5651.c     |  8 ++++----
 sound/soc/codecs/rt5659.c     |  8 ++++----
 sound/soc/codecs/rt5660.c     |  8 ++++----
 sound/soc/codecs/rt5663.c     |  6 +++---
 sound/soc/codecs/rt5665.c     |  8 ++++----
 sound/soc/codecs/rt5668.c     |  6 +++---
 sound/soc/codecs/rt5670.c     |  8 ++++----
 sound/soc/codecs/rt5677-spi.c |  5 +++--
 sound/soc/codecs/rt5677.c     |  3 ++-
 sound/soc/codecs/rt5682-i2c.c |  6 +++---
 sound/soc/codecs/rt5682s.c    |  7 ++++---
 25 files changed, 90 insertions(+), 83 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/24 ASoC: codecs: rt1011: Fix definition of device_id tables

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1011.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1011.c +3 -3
index a0e75b03e9dc..71355b7ce7e2 100644
@@ -2192,15 +2192,15 @@ static const struct regmap_config rt1011_regmap = {
 #if defined(CONFIG_OF)
 static const struct of_device_id rt1011_of_match[] = {
 	{ .compatible = "realtek,rt1011", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt1011_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1011_acpi_match[] = {
-	{"10EC1011", 0,},
-	{},
+	{ "10EC1011" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1011_acpi_match);
 #endif
Signature · 1 line
2.25.1
#2 lore raw

PATCH 2/24 ASoC: codecs: rt1015: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1015.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1015.c +3 -3
index 0f806dde9c39..beed43bb7ca0 100644
@@ -1105,15 +1105,15 @@ MODULE_DEVICE_TABLE(i2c, rt1015_i2c_id);
 #if defined(CONFIG_OF)
 static const struct of_device_id rt1015_of_match[] = {
 	{ .compatible = "realtek,rt1015", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt1015_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1015_acpi_match[] = {
-	{"10EC1015", 0,},
-	{},
+	{ "10EC1015" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1015_acpi_match);
 #endif
Signature · 1 line
2.25.1
#3 lore raw

PATCH 3/24 ASoC: codecs: rt1016: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1016.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1016.c +3 -3
index fed4da23cba2..2cbeb06b15da 100644
@@ -616,15 +616,15 @@ MODULE_DEVICE_TABLE(i2c, rt1016_i2c_id);
 #if defined(CONFIG_OF)
 static const struct of_device_id rt1016_of_match[] = {
 	{ .compatible = "realtek,rt1016", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt1016_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1016_acpi_match[] = {
-	{"10EC1016", 0,},
-	{},
+	{ "10EC1016" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1016_acpi_match);
 #endif
Signature · 1 line
2.25.1
#4 lore raw

PATCH 4/24 ASoC: codecs: rt1019: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1019.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1019.c +3 -3
index d989d06a2614..2587e3742499 100644
@@ -547,14 +547,14 @@ MODULE_DEVICE_TABLE(i2c, rt1019_i2c_id);
 
 static const struct of_device_id rt1019_of_match[] __maybe_unused = {
 	{ .compatible = "realtek,rt1019", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt1019_of_match);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1019_acpi_match[] = {
-	{ "10EC1019", 0},
-	{ },
+	{ "10EC1019" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1019_acpi_match);
 #endif
Signature · 1 line
2.25.1
#5 lore raw

PATCH 5/24 ASoC: codecs: rt1305: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1305.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1305.c +3 -3
index c2b55be8d165..b4e10ba00dca 100644
@@ -973,9 +973,9 @@ MODULE_DEVICE_TABLE(of, rt1305_of_match);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1305_acpi_match[] = {
-	{"10EC1305", 0,},
-	{"10EC1306", 0,},
-	{},
+	{ "10EC1305" },
+	{ "10EC1306" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1305_acpi_match);
 #endif
Signature · 1 line
2.25.1
#6 lore raw

PATCH 6/24 ASoC: codecs: rt1308: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1308.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1308.c +3 -3
index b366338cea71..a9ba66228301 100644
@@ -781,15 +781,15 @@ static const struct regmap_config rt1308_regmap = {
 #ifdef CONFIG_OF
 static const struct of_device_id rt1308_of_match[] = {
 	{ .compatible = "realtek,rt1308", },
-	{ },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, rt1308_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1308_acpi_match[] = {
-	{ "10EC1308", 0, },
-	{ },
+	{ "10EC1308" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1308_acpi_match);
 #endif
Signature · 1 line
2.25.1
#7 lore raw

Re: [PATCH 06/24] ASoC: codecs: rt1308: Fix definition of device_id tables

Quoted 2 lines · Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

...

sound/soc/codecs/rt1308.c static const struct regmap_config rt1308_regmap = { · line 792

Quoted 3 lines
sound/soc/codecs/rt1308.c +2 -0
+	{ }
 
+	{}

I think you want a bit of consistency in the style of the terminator. Preferable (by majority) is with space inside, but some are okay without it. I have no preferences, just one style for all in the same driver.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#8 lore raw

Re: [PATCH 06/24] ASoC: codecs: rt1308: Fix definition of device_id tables

Quoted 6 lines · Andy Shevchenko
Quoted 2 lines · Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

...

Quoted 7 lines

sound/soc/codecs/rt1308.c static const struct regmap_config rt1308_regmap = { · line 792

Quoted 3 lines
sound/soc/codecs/rt1308.c +2 -0
+	{ }
 
+	{}

I think you want a bit of consistency in the style of the terminator. Preferable (by majority) is with space inside, but some are okay without it. I have no preferences, just one style for all in the same driver.

Ack. What happened is: in some cases I just updated the line according to the standard whereas in others I did remove ',' and other stuff while aligning with my spacing preference. Will pick one for v2.

Czarek

#9 lore raw

PATCH 7/24 ASoC: codecs: rt1318: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1318.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1318.c +3 -3
index e12b1e96a53a..69cd32acbe7c 100644
@@ -1147,14 +1147,14 @@ MODULE_DEVICE_TABLE(i2c, rt1318_i2c_id);
 
 static const struct of_device_id rt1318_of_match[] = {
 	{ .compatible = "realtek,rt1318", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt1318_of_match);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1318_acpi_match[] = {
-	{ "10EC1318", 0},
-	{ },
+	{ "10EC1318" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1318_acpi_match);
 #endif
Signature · 1 line
2.25.1
#10 lore raw

PATCH 8/24 ASoC: codecs: rt274: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt274.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt274.c +4 -4
index bd61a257d7b5..15bbd920fda2 100644
@@ -1091,7 +1091,7 @@ static const struct regmap_config rt274_regmap = {
 #ifdef CONFIG_OF
 static const struct of_device_id rt274_of_match[] = {
 	{.compatible = "realtek,rt274"},
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt274_of_match);
 #endif
@@ -1104,9 +1104,9 @@ MODULE_DEVICE_TABLE(i2c, rt274_i2c_id);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt274_acpi_match[] = {
-	{ "10EC0274", 0 },
-	{ "INT34C2", 0 },
-	{},
+	{ "10EC0274" },
+	{ "INT34C2" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt274_acpi_match);
 #endif
Signature · 1 line
2.25.1
#11 lore raw

PATCH 9/24 ASoC: codecs: rt5514: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5514.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5514.c +3 -3
index 2b3c0f9e178c..69141a5773bb 100644
@@ -1207,15 +1207,15 @@ MODULE_DEVICE_TABLE(i2c, rt5514_i2c_id);
 #if defined(CONFIG_OF)
 static const struct of_device_id rt5514_of_match[] = {
 	{ .compatible = "realtek,rt5514", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5514_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5514_acpi_match[] = {
-	{ "10EC5514", 0},
-	{},
+	{ "10EC5514" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5514_acpi_match);
 #endif
Signature · 1 line
2.25.1
#12 lore raw

PATCH 10/24 ASoC: codecs: rt5640: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5640.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
sound/soc/codecs/rt5640.c +7 -7
index 82db9dceddb6..d41c9df353d2 100644
@@ -2963,19 +2963,19 @@ MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id);
 static const struct of_device_id rt5640_of_match[] = {
 	{ .compatible = "realtek,rt5639", },
 	{ .compatible = "realtek,rt5640", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5640_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5640_acpi_match[] = {
-	{ "INT33CA", 0 },
-	{ "10EC3276", 0 },
-	{ "10EC5640", 0 },
-	{ "10EC5642", 0 },
-	{ "INTCCFFD", 0 },
-	{ },
+	{ "INT33CA" },
+	{ "10EC3276" },
+	{ "10EC5640" },
+	{ "10EC5642" },
+	{ "INTCCFFD" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
 #endif
Signature · 1 line
2.25.1
#13 lore raw

PATCH 11/24 ASoC: codecs: rt5645: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5645.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/rt5645.c +6 -6
index 51187b1e0ed2..794a81be6ef7 100644
@@ -3660,12 +3660,12 @@ MODULE_DEVICE_TABLE(of, rt5645_of_match);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5645_acpi_match[] = {
-	{ "10EC5645", 0 },
-	{ "10EC5648", 0 },
-	{ "10EC5650", 0 },
-	{ "10EC5640", 0 },
-	{ "10EC3270", 0 },
-	{},
+	{ "10EC5645" },
+	{ "10EC5648" },
+	{ "10EC5650" },
+	{ "10EC5640" },
+	{ "10EC3270" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
 #endif
Signature · 1 line
2.25.1
#14 lore raw

PATCH 12/24 ASoC: codecs: rt5651: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5651.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5651.c +4 -4
index 00421a1f54bf..a4ea6c47617a 100644
@@ -2184,16 +2184,16 @@ static const struct regmap_config rt5651_regmap = {
 #if defined(CONFIG_OF)
 static const struct of_device_id rt5651_of_match[] = {
 	{ .compatible = "realtek,rt5651", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5651_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5651_acpi_match[] = {
-	{ "10EC5651", 0 },
-	{ "10EC5640", 0 },
-	{ },
+	{ "10EC5651" },
+	{ "10EC5640" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5651_acpi_match);
 #endif
Signature · 1 line
2.25.1
#15 lore raw

PATCH 13/24 ASoC: codecs: rt5659: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5659.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5659.c +4 -4
index a2652fa6e1d7..29f521716389 100644
@@ -4315,16 +4315,16 @@ static void rt5659_i2c_shutdown(struct i2c_client *client)
 static const struct of_device_id rt5659_of_match[] = {
 	{ .compatible = "realtek,rt5658", },
 	{ .compatible = "realtek,rt5659", },
-	{ },
+	{ }
 };
 MODULE_DEVICE_TABLE(of, rt5659_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5659_acpi_match[] = {
-	{ "10EC5658", 0, },
-	{ "10EC5659", 0, },
-	{ },
+	{ "10EC5658" },
+	{ "10EC5659" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5659_acpi_match);
 #endif
Signature · 1 line
2.25.1
#16 lore raw

PATCH 14/24 ASoC: codecs: rt5660: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5660.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5660.c +4 -4
index 3ac41d2c279b..fe8c27297599 100644
@@ -1232,16 +1232,16 @@ MODULE_DEVICE_TABLE(i2c, rt5660_i2c_id);
 #ifdef CONFIG_OF
 static const struct of_device_id rt5660_of_match[] = {
 	{ .compatible = "realtek,rt5660", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5660_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5660_acpi_match[] = {
-	{ "10EC5660", 0 },
-	{ "10EC3277", 0 },
-	{ },
+	{ "10EC5660" },
+	{ "10EC3277" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5660_acpi_match);
 #endif
Signature · 1 line
2.25.1
#17 lore raw

Re: [PATCH 14/24] ASoC: codecs: rt5660: Fix definition of device_id tables

Quoted 2 lines · Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

...

sound/soc/codecs/rt5660.c MODULE_DEVICE_TABLE(i2c, rt5660_i2c_id); · line 1245

Quoted 8 lines

static const struct acpi_device_id rt5660_acpi_match[] = {

sound/soc/codecs/rt5660.c +3 -3
-	{ "10EC5660", 0 },
-	{ "10EC3277", 0 },
-	{ },
+	{ "10EC5660" },
+	{ "10EC3277" },
+	{}
 };

While at it, can you sort them alphabetically?

Also, a side note: perhaps at some point you are going to remove those ugly ifdeffery around them along with unuseful ACPI_PTR() / of_match_ptr() calls. With that in some cases we can get rid of unneeded of.h and/or acpi.h inclusions (the ID table definitions come from mod_devicetable.h).

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#18 lore raw

Re: [PATCH 14/24] ASoC: codecs: rt5660: Fix definition of device_id tables

Quoted 6 lines · Andy Shevchenko
Quoted 2 lines · Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

...

Quoted 10 lines

sound/soc/codecs/rt5660.c MODULE_DEVICE_TABLE(i2c, rt5660_i2c_id); · line 1245

Quoted 8 lines
  static const struct acpi_device_id rt5660_acpi_match[] = {
sound/soc/codecs/rt5660.c +3 -3
-	{ "10EC5660", 0 },
-	{ "10EC3277", 0 },
-	{ },
+	{ "10EC5660" },
+	{ "10EC3277" },
+	{}
  };

While at it, can you sort them alphabetically?

Ack.

Quoted 4 lines

Also, a side note: perhaps at some point you are going to remove those ugly ifdeffery around them along with unuseful ACPI_PTR() / of_match_ptr() calls. With that in some cases we can get rid of unneeded of.h and/or acpi.h inclusions (the ID table definitions come from mod_devicetable.h).

I do not see a reason not to. We'll do so in a separate series to not mix the subjects though. This will probably also scale beyond 'just' rt*.

Czarek

#19 lore raw

PATCH 15/24 ASoC: codecs: rt5663: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5663.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5663.c +3 -3
index 9d32debd3689..aa684d62bec6 100644
@@ -3315,15 +3315,15 @@ MODULE_DEVICE_TABLE(i2c, rt5663_i2c_id);
 #if defined(CONFIG_OF)
 static const struct of_device_id rt5663_of_match[] = {
 	{ .compatible = "realtek,rt5663", },
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5663_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5663_acpi_match[] = {
-	{ "10EC5663", 0},
-	{},
+	{ "10EC5663" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5663_acpi_match);
 #endif
Signature · 1 line
2.25.1
#20 lore raw

PATCH 16/24 ASoC: codecs: rt5665: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5665.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5665.c +4 -4
index 47df14ba5278..61d098a57b3b 100644
@@ -4949,16 +4949,16 @@ static void rt5665_i2c_shutdown(struct i2c_client *client)
 static const struct of_device_id rt5665_of_match[] = {
 	{.compatible = "realtek,rt5665"},
 	{.compatible = "realtek,rt5666"},
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5665_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5665_acpi_match[] = {
-	{"10EC5665", 0,},
-	{"10EC5666", 0,},
-	{},
+	{ "10EC5665" },
+	{ "10EC5666" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5665_acpi_match);
 #endif
Signature · 1 line
2.25.1
#21 lore raw

PATCH 17/24 ASoC: codecs: rt5668: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5668.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5668.c +3 -3
index 494ca3ce9b96..463aa81dce25 100644
@@ -2598,15 +2598,15 @@ static void rt5668_i2c_shutdown(struct i2c_client *client)
 #ifdef CONFIG_OF
 static const struct of_device_id rt5668_of_match[] = {
 	{.compatible = "realtek,rt5668b"},
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5668_of_match);
 #endif
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5668_acpi_match[] = {
-	{"10EC5668", 0,},
-	{},
+	{ "10EC5668" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5668_acpi_match);
 #endif
Signature · 1 line
2.25.1
#22 lore raw

PATCH 18/24 ASoC: codecs: rt5670: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5670.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5670.c +4 -4
index 30bf96c35b58..f40c98920ce1 100644
@@ -2880,10 +2880,10 @@ MODULE_DEVICE_TABLE(i2c, rt5670_i2c_id);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5670_acpi_match[] = {
-	{ "10EC5670", 0},
-	{ "10EC5672", 0},
-	{ "10EC5640", 0}, /* quirk */
-	{ },
+	{ "10EC5670" },
+	{ "10EC5672" },
+	{ "10EC5640" }, /* quirk */
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match);
 #endif
Signature · 1 line
2.25.1
#23 lore raw

PATCH 19/24 ASoC: codecs: rt5682: Fix definition of device_id tables

In reply to Cezary Rojewski

There shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5682-i2c.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5682-i2c.c +3 -3
index a8820435d1e0..fa950811b3a7 100644
@@ -313,13 +313,13 @@ static void rt5682_i2c_remove(struct i2c_client *client)
 
 static const struct of_device_id rt5682_of_match[] = {
 	{.compatible = "realtek,rt5682i"},
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5682_of_match);
 
 static const struct acpi_device_id rt5682_acpi_match[] = {
-	{"10EC5682", 0,},
-	{},
+	{ "10EC5682" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5682_acpi_match);
 
Signature · 1 line
2.25.1
#24 lore raw

PATCH 20/24 ASoC: codecs: rt1015p: Update definition of device_id tables

In reply to Cezary Rojewski

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1015p.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1015p.c +5 -3
index 44e7fe3c32da..33917438196f 100644
@@ -133,9 +133,11 @@ MODULE_DEVICE_TABLE(of, rt1015p_device_id);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt1015p_acpi_match[] = {
-	{ "RTL1015", 0},
-	{ "RTL1019", 0},
-	{ },
+	{ "RTL1015" },
+	{ "RTL1019" },
+	{ "10EC1015" },
+	{ "10EC1019" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt1015p_acpi_match);
 #endif
Signature · 1 line
2.25.1
maintainer
#25 lore raw

RE: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

Quoted 35 lines

-----Original Message-----
From: Cezary Rojewski <[email protected]>
Sent: Thursday, February 20, 2025 7:27 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Oder Chiou <[email protected]>; Flove(HsinFu) <[email protected]>; [email protected]; Cezary Rojewski <[email protected]>
Subject: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe.

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt1015p.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1015p.c +0 -0
index 44e7fe3c32da..33917438196f 100644
@@ -133,9 +133,11 @@ MODULE_DEVICE_TABLE(of, rt1015p_device_id);
 

sound/soc/codecs/rt1015p.c MODULE_DEVICE_TABLE(of, rt1015p_device_id); · line 140

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

There are different settings for RTL1015, RTL1019, 10EC1015, and 10EC1019. RTL1015 and RTL1019 are used for powering up and down via the GPIO. 10EC1015 and 10EC1019 are used for the I2C-controlled driver. Therefore 10EC1015 and 10EC1019 should be removed.

Quoted 5 lines
sound/soc/codecs/rt1015p.c +0 -1
 };
 MODULE_DEVICE_TABLE(acpi, rt1015p_acpi_match);
 #endif
--

2.25.1

#26 lore raw

Re: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

Quoted 35 lines · Oder Chiou
Quoted 35 lines

-----Original Message-----
From: Cezary Rojewski <[email protected]>
Sent: Thursday, February 20, 2025 7:27 PM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Oder Chiou <[email protected]>; Flove(HsinFu) <[email protected]>; [email protected]; Cezary Rojewski <[email protected]>
Subject: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe.

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
  sound/soc/codecs/rt1015p.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1015p.c +0 -0
index 44e7fe3c32da..33917438196f 100644
@@ -133,9 +133,11 @@ MODULE_DEVICE_TABLE(of, rt1015p_device_id);
 
Quoted 15 lines

sound/soc/codecs/rt1015p.c MODULE_DEVICE_TABLE(of, rt1015p_device_id); · line 140

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

There are different settings for RTL1015, RTL1019, 10EC1015, and 10EC1019. RTL1015 and RTL1019 are used for powering up and down via the GPIO. 10EC1015 and 10EC1019 are used for the I2C-controlled driver. Therefore 10EC1015 and 10EC1019 should be removed.

Sorry for the delay in response and thank for you the feedback.

I'm surprised this hasn't come up earlier in the discussion. I'll probably cut off problematic patches so that majority can be merged. It's important to have some follow up though, on the subject you mentioned. Correct me if I'm wrong but from the .c files it seems:

for DT/ARM rt1015 & rt1015p are represented by:

	.compatible = "realtek,rt1015"
	.compatible = "realtek,rt1015p"

for ACPI/x86 rt1015 & rt1015p are represented by:

	"10EC1015"
	"RTL1015"

The first pair is nice and clean, the second is confusing and error prone. Do you know where the second pair originated from?

Kind regards,
Czarek

maintainer
#27 lore raw

RE: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

Quoted 84 lines

-----Original Message-----
From: Cezary Rojewski <[email protected]>
Sent: Wednesday, February 26, 2025 5:42 PM
To: Oder Chiou <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Flove(HsinFu) <[email protected]>; [email protected]; Shuming [范書銘] <[email protected]>; Jack Yu <[email protected]>; Derek [方德義] <[email protected]>
Subject: Re: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe.

Quoted 5 lines · Oder Chiou
Quoted 5 lines

-----Original Message-----
From: Cezary Rojewski <[email protected]>
Sent: Thursday, February 20, 2025 7:27 PM
To: [email protected]
Cc: [email protected]; [email protected];

[email protected];

Quoted 4 lines
Quoted 4 lines

[email protected]; Oder Chiou <[email protected]>; Flove(HsinFu) <[email protected]>; [email protected]; Cezary Rojewski <[email protected]>
Subject: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of

device_id

Quoted 26 lines
Quoted 26 lines

tables

External mail : This email originated from outside the organization. Do not reply, click links, or open attachments unless you recognize the sender and know the content is safe.

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
  sound/soc/codecs/rt1015p.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1015p.c +0 -0
index 44e7fe3c32da..33917438196f 100644
@@ -133,9 +133,11 @@ MODULE_DEVICE_TABLE(of, rt1015p_device_id);
 
Quoted 15 lines

sound/soc/codecs/rt1015p.c MODULE_DEVICE_TABLE(of, rt1015p_device_id); · line 140

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

There are different settings for RTL1015, RTL1019, 10EC1015, and 10EC1019. RTL1015 and RTL1019 are used for powering up and down via the GPIO. 10EC1015 and 10EC1019 are used for the I2C-controlled driver. Therefore 10EC1015 and 10EC1019 should be removed.

Sorry for the delay in response and thank for you the feedback.

I'm surprised this hasn't come up earlier in the discussion. I'll probably cut off problematic patches so that majority can be merged. It's important to have some follow up though, on the subject you mentioned. Correct me if I'm wrong but from the .c files it seems:

for DT/ARM rt1015 & rt1015p are represented by:

        .compatible = "realtek,rt1015"
        .compatible = "realtek,rt1015p"
Quoted 6 lines

for ACPI/x86 rt1015 & rt1015p are represented by:

        "10EC1015"
        "RTL1015"

The first pair is nice and clean, the second is confusing and error prone. Do you know where the second pair originated from?

10EC is defined by the PCI domain, and RTL is defined by the PNP domain. To distinguish these, 1015, 1019, and 5682 use different drivers, with the RTL prefix being used to instead of the p postfix in the DT.

#28 lore raw

Re: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

Quoted 11 lines · Oder Chiou
Quoted 11 lines

-----Original Message-----
From: Cezary Rojewski <[email protected]>
Sent: Wednesday, February 26, 2025 5:42 PM
To: Oder Chiou <[email protected]>; [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Flove(HsinFu) <[email protected]>; [email protected]; Shuming [范書銘] <[email protected]>; Jack Yu <[email protected]>; Derek [方德義] <[email protected]>
Subject: Re: [PATCH 20/24] ASoC: codecs: rt1015p: Update definition of device_id tables

...

Quoted 37 lines
Quoted 37 lines
Quoted 6 lines
Quoted 6 lines
sound/soc/codecs/rt1015p.c +0 -0
index 44e7fe3c32da..33917438196f 100644
@@ -133,9 +133,11 @@ MODULE_DEVICE_TABLE(of, rt1015p_device_id);
 
Quoted 15 lines

sound/soc/codecs/rt1015p.c MODULE_DEVICE_TABLE(of, rt1015p_device_id); · line 140

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

There are different settings for RTL1015, RTL1019, 10EC1015, and 10EC1019. RTL1015 and RTL1019 are used for powering up and down via the GPIO. 10EC1015 and 10EC1019 are used for the I2C-controlled driver. Therefore 10EC1015 and 10EC1019 should be removed.

Sorry for the delay in response and thank for you the feedback.

I'm surprised this hasn't come up earlier in the discussion. I'll probably cut off problematic patches so that majority can be merged. It's important to have some follow up though, on the subject you mentioned. Correct me if I'm wrong but from the .c files it seems:

for DT/ARM rt1015 & rt1015p are represented by:

         .compatible = "realtek,rt1015"
         .compatible = "realtek,rt1015p"

for ACPI/x86 rt1015 & rt1015p are represented by:

         "10EC1015"
         "RTL1015"
Quoted 5 lines
Quoted 2 lines

The first pair is nice and clean, the second is confusing and error prone. Do you know where the second pair originated from?

10EC is defined by the PCI domain, and RTL is defined by the PNP domain. To distinguish these, 1015, 1019, and 5682 use different drivers, with the RTL prefix being used to instead of the p postfix in the DT.

Thank you for the reminder. I'm aware of the origins for PCI/PNP prefixes, though. In fact, there is more to it - OBDA [1] and ALG [2]. The idea is to choose one _recommended path_ and follow it. If the desire is to name future chips using suffixes such as -p or -s, then perhaps PNP-based naming should have been selected instead. Another option would be to change the hardware naming scheme e.g: '1016' instead of '1015p'.

If the latter is not an option, why not:

	RTL1015
	RTL1015P

on ACPI/x86 side? Aligns with ARM equivalent nicely, no?

[1]: https://uefi.org/ACPI_ID_List?acpi_search=realtek
[2]: https://uefi.org/PNP_ID_List?pnp_search=realtek

Kind regards,
Czarek

#29 lore raw

PATCH 21/24 ASoC: codecs: rt286: Update definition of device_id tables

In reply to Cezary Rojewski

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt286.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/rt286.c +3 -2
index d0f533120c33..c187e580c0ca 100644
@@ -1083,8 +1083,9 @@ MODULE_DEVICE_TABLE(i2c, rt286_i2c_id);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt286_acpi_match[] = {
-	{ "INT343A", 0 },
-	{},
+	{ "10EC0286" },
+	{ "INT343A" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt286_acpi_match);
 #endif
Signature · 1 line
2.25.1
#30 lore raw

PATCH 22/24 ASoC: codecs: rt298: Update definition of device_id tables

In reply to Cezary Rojewski

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt298.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/codecs/rt298.c +3 -2
index 13aef6c5e91c..37c234f1109a 100644
@@ -1144,8 +1144,9 @@ MODULE_DEVICE_TABLE(i2c, rt298_i2c_id);
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt298_acpi_match[] = {
-	{ "INT343A", 0 },
-	{},
+	{ "10EC0298" },
+	{ "INT343A" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt298_acpi_match);
 #endif
Signature · 1 line
2.25.1
#31 lore raw

PATCH 23/24 ASoC: codecs: rt5677: Update definition of device_id tables

In reply to Cezary Rojewski

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5677-spi.c | 5 +++--
 sound/soc/codecs/rt5677.c     | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5677-spi.c +3 -2
index d91a2184f67c..3b9c23aa255f 100644
@@ -617,8 +617,9 @@ static int rt5677_spi_probe(struct spi_device *spi)
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5677_spi_acpi_id[] = {
-	{ "RT5677AA", 0 },
-	{ }
+	{ "RT5677AA" },
+	{ "10EC5677" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5677_spi_acpi_id);
 #endif
sound/soc/codecs/rt5677.c +2 -1
index 0e70a3ab42b5..d9b173ba7f6e 100644
@@ -5202,7 +5202,8 @@ MODULE_DEVICE_TABLE(of, rt5677_of_match);
 
 static const struct acpi_device_id rt5677_acpi_match[] = {
 	{ "RT5677CE", RT5677 },
-	{ }
+	{ "10EC5677", RT5677 },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5677_acpi_match);
 
Signature · 1 line
2.25.1
#32 lore raw

PATCH 24/24 ASoC: codecs: rt5682s: Update definition of device_id tables

In reply to Cezary Rojewski

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5682s.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5682s.c +4 -3
index ce2e88e066f3..5ad0cc3fab7f 100644
@@ -3310,13 +3310,14 @@ static void rt5682s_i2c_remove(struct i2c_client *client)
 
 static const struct of_device_id rt5682s_of_match[] = {
 	{.compatible = "realtek,rt5682s"},
-	{},
+	{}
 };
 MODULE_DEVICE_TABLE(of, rt5682s_of_match);
 
 static const struct acpi_device_id rt5682s_acpi_match[] = {
-	{"RTL5682", 0,},
-	{},
+	{ "RTL5682" },
+	{ "10EC5682" },
+	{}
 };
 MODULE_DEVICE_TABLE(acpi, rt5682s_acpi_match);
 
Signature · 1 line
2.25.1
#33 lore raw

RE: [PATCH 24/24] ASoC: codecs: rt5682s: Update definition of device_id tables

Quoted 21 lines

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
 sound/soc/codecs/rt5682s.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5682s.c index renamed from sound/soc/codecs/rt5682s.c +0 -0

ce2e88e066f3..5ad0cc3fab7f 100644

sound/soc/codecs/rt5682s.c +0 -1
@@ -3310,13 +3310,14 @@ static void rt5682s_i2c_remove(struct i2c_client
 *client)
 
 static const struct of_device_id rt5682s_of_match[] = {
        {.compatible = "realtek,rt5682s"},
-       {},

sound/soc/codecs/rt5682s.c static void rt5682s_i2c_remove(struct i2c_client · line 3321

Quoted 10 lines
sound/soc/codecs/rt5682s.c +4 -2
+       {}
 };
 MODULE_DEVICE_TABLE(of, rt5682s_of_match);
 
 static const struct acpi_device_id rt5682s_acpi_match[] = {
-       {"RTL5682", 0,},
-       {},
+       { "RTL5682" },
+       { "10EC5682" },
+       {}

The rt5682s and rt5682 are different codec drivers. The rt5682s uses RTL5682 APCI ID and rt5682 uses 10EC5682.

Quoted 6 lines
sound/soc/codecs/rt5682s.c +0 -1
 };
 MODULE_DEVICE_TABLE(acpi, rt5682s_acpi_match);
 
--

2.25.1

#34 lore raw

Re: [PATCH 24/24] ASoC: codecs: rt5682s: Update definition of device_id tables

Quoted 25 lines · Shuming [范書銘]
Quoted 25 lines

Follow PCI-based format (10ECxxxx) for ACPI IDs by adding relevant entries to the existing table.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

---
  sound/soc/codecs/rt5682s.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)
sound/soc/codecs/rt5682s.c index renamed from sound/soc/codecs/rt5682s.c +0 -0

ce2e88e066f3..5ad0cc3fab7f 100644

sound/soc/codecs/rt5682s.c +1 -1
@@ -3310,13 +3310,14 @@ static void rt5682s_i2c_remove(struct i2c_client
 *client)
 
  static const struct of_device_id rt5682s_of_match[] = {
         {.compatible = "realtek,rt5682s"},
-       {},
+       {}
  };
  MODULE_DEVICE_TABLE(of, rt5682s_of_match);
 
Quoted 9 lines

sound/soc/codecs/rt5682s.c static void rt5682s_i2c_remove(struct i2c_client *client) · line 3320

Quoted 6 lines
sound/soc/codecs/rt5682s.c +3 -2
  static const struct acpi_device_id rt5682s_acpi_match[] = {
-       {"RTL5682", 0,},
-       {},
+       { "RTL5682" },
+       { "10EC5682" },
+       {}

The rt5682s and rt5682 are different codec drivers. The rt5682s uses RTL5682 APCI ID and rt5682 uses 10EC5682.

Sorry for the delay in my response. Thank you for the review, Shuming!

I have similar thoughts as for patch 20/24 and rt1015p case, reviewed by Chiou. To not dilute the subject too much, I'd suggest continue the "confusing IDs" discussion there. For v2, this patch will be removed to not block the merge.

Kind regards,
Czarek

#35 lore raw
In reply to Cezary Rojewski
Quoted 6 lines · Cezary Rojewski

The series aims to streamline the formatting for ACPI IDs so that a single pattern can be used to identify the device.

Work implicitly suggested by Andy Shevchenko - reading and learning from number of his reviews on the Linux mailing lists.

Quoted 8 lines

Several formats do exists, however, after technical discussion PCI-based format has been selected as the recommended one. For Realtek devices, it is going to be 10ECxxxx where 10EC unambiguously identifies Realtek company whereas the following 4 hexes specify the PART_ID i.e.: the device.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

I should add that the latter one (removing '0':s) is basically Uwe's idea in a long-term conversion driver_data to become a const void * instead of kernel_ulong_t (in some cases).

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#36 lore raw
In reply to Cezary Rojewski
Quoted 6 lines · Cezary Rojewski

The series aims to streamline the formatting for ACPI IDs so that a single pattern can be used to identify the device.

Work implicitly suggested by Andy Shevchenko - reading and learning from number of his reviews on the Linux mailing lists.

Quoted 8 lines

Several formats do exists, however, after technical discussion PCI-based format has been selected as the recommended one. For Realtek devices, it is going to be 10ECxxxx where 10EC unambiguously identifies Realtek company whereas the following 4 hexes specify the PART_ID i.e.: the device.

While at it, there shall be no comma after the terminator entry and initializing fields with 0 for statically defined structs is redundant.

I briefly looked at them all and found two issues I commented on in a couple of cases as an example (you need to go through whole series) and one side note.

If you address those comments, I will give you a tag.

Signature · 2 lines
With Best Regards,
Andy Shevchenko