Skip to contentSkip to conversation

ASoC: codecs: Update device_id tables for Realtek drivers

PATCH In review Cezary Rojewski 3 participants 26 messages Feb 26, 2025 – Mar 4, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 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

Changes in v2:
- dropped 2 conflicting patches for rt1015p and rt5682s as pointed out by Choiu and Shuming
- sorted ACPI IDs alphabetically as suggested by Andy. This targets numerous patches and is noted by 'While at it, sort the IDs alphabetically.' in the commit message
- spacing (whitespaces) should now be cohesive across all patches

Cezary Rojewski (22):
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: 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

 sound/soc/codecs/rt1011.c     |  6 +++---
 sound/soc/codecs/rt1015.c     |  6 +++---
 sound/soc/codecs/rt1016.c     |  6 +++---
 sound/soc/codecs/rt1019.c     |  6 +++---
 sound/soc/codecs/rt1305.c     |  8 ++++----
 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 |  3 ++-
 sound/soc/codecs/rt5677.c     |  1 +
 sound/soc/codecs/rt5682-i2c.c |  6 +++---
 23 files changed, 80 insertions(+), 76 deletions(-)
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 1/22 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..fb76f9e020ff 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 v2 2/22 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..ea8037117d42 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 v2 3/22 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..132c102983bf 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 v2 4/22 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..86539c6f6cc1 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 v2 5/22 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 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt1305.c +4 -4
index c2b55be8d165..59ddc4b21803 100644
@@ -966,16 +966,16 @@ static const struct regmap_config rt1305_regmap = {
 static const struct of_device_id rt1305_of_match[] = {
 	{ .compatible = "realtek,rt1305", },
 	{ .compatible = "realtek,rt1306", },
-	{},
+	{ }
 };
 MODULE_DEVICE_TABLE(of, rt1305_of_match);
 #endif
 
 #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 v2 6/22 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..90d14e2d62f1 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

PATCH v2 7/22 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..ae01b2ce630b 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
#8 lore raw

PATCH v2 8/22 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..b27e9d06e32d 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
#9 lore raw

PATCH v2 9/22 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 9cb74962161a..a7f984b5d80f 100644
@@ -1206,15 +1206,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
#10 lore raw

PATCH v2 10/22 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.

While at it, sort the IDs alphabetically.

---
 sound/soc/codecs/rt5640.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
sound/soc/codecs/rt5640.c +7 -7
index 82db9dceddb6..c6ec3729b9c4 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 },
-	{ },
+	{ "10EC3276" },
+	{ "10EC5640" },
+	{ "10EC5642" },
+	{ "INT33CA" },
+	{ "INTCCFFD" },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
 #endif
Signature · 1 line
2.25.1
#11 lore raw

PATCH v2 11/22 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.

While at it, sort the IDs alphabetically.

---
 sound/soc/codecs/rt5645.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
sound/soc/codecs/rt5645.c +6 -6
index 51187b1e0ed2..56cf410926e3 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 },
-	{},
+	{ "10EC3270" },
+	{ "10EC5640" },
+	{ "10EC5645" },
+	{ "10EC5648" },
+	{ "10EC5650" },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
 #endif
Signature · 1 line
2.25.1
#12 lore raw

PATCH v2 12/22 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.

While at it, sort the IDs alphabetically.

---
 sound/soc/codecs/rt5651.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5651.c +4 -4
index 00421a1f54bf..2c1fad3ee690 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 },
-	{ },
+	{ "10EC5640" },
+	{ "10EC5651" },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5651_acpi_match);
 #endif
Signature · 1 line
2.25.1
#13 lore raw

PATCH v2 13/22 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.

While at it, sort the IDs alphabetically.

---
 sound/soc/codecs/rt5659.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5659.c +4 -4
index a2652fa6e1d7..e5e8ccc604eb 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
#14 lore raw

PATCH v2 14/22 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.

While at it, sort the IDs alphabetically.

---
 sound/soc/codecs/rt5660.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5660.c +4 -4
index 3ac41d2c279b..7e8ac735b82c 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 },
-	{ },
+	{ "10EC3277" },
+	{ "10EC5660" },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5660_acpi_match);
 #endif
Signature · 1 line
2.25.1
#15 lore raw

PATCH v2 15/22 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..874c5ea3efb5 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
#16 lore raw

PATCH v2 16/22 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..be5ddb4be6df 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
#17 lore raw

PATCH v2 17/22 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..51be7b1f900b 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
#18 lore raw

PATCH v2 18/22 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.

While at it, sort the IDs alphabetically.

---
 sound/soc/codecs/rt5670.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/rt5670.c +4 -4
index 30bf96c35b58..c18fc86a2513 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 */
-	{ },
+	{ "10EC5640" }, /* quirk */
+	{ "10EC5670" },
+	{ "10EC5672" },
+	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5670_acpi_match);
 #endif
Signature · 1 line
2.25.1
#19 lore raw

PATCH v2 19/22 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..bba987308e15 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
#20 lore raw

PATCH v2 20/22 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..5ad1b9311d11 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
#21 lore raw

PATCH v2 21/22 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..dd2d27515e7e 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
#22 lore raw

PATCH v2 22/22 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 | 3 ++-
 sound/soc/codecs/rt5677.c     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/rt5677-spi.c +2 -1
index d91a2184f67c..abe0a5a95770 100644
@@ -617,7 +617,8 @@ static int rt5677_spi_probe(struct spi_device *spi)
 
 #ifdef CONFIG_ACPI
 static const struct acpi_device_id rt5677_spi_acpi_id[] = {
-	{ "RT5677AA", 0 },
+	{ "10EC5677" },
+	{ "RT5677AA" },
 	{ }
 };
 MODULE_DEVICE_TABLE(acpi, rt5677_spi_acpi_id);
sound/soc/codecs/rt5677.c +1 -0
index 0e70a3ab42b5..d1e0b93d6ee6 100644
@@ -5201,6 +5201,7 @@ static const struct of_device_id rt5677_of_match[] = {
 MODULE_DEVICE_TABLE(of, rt5677_of_match);
 
 static const struct acpi_device_id rt5677_acpi_match[] = {
+	{ "10EC5677", RT5677 },
 	{ "RT5677CE", RT5677 },
 	{ }
 };
Signature · 1 line
2.25.1
#23 lore raw

Re: [PATCH v2 22/22] ASoC: codecs: rt5677: Update definition of device_id tables

Quoted 4 lines · 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 there is none already.

Quoted 2 lines

and
initializing fields with 0 for statically defined structs is redundant.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
Reviewed-by on the v2 series
#24 lore raw
In reply to Cezary Rojewski
Quoted 12 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.

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.

Quoted 6 lines

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

For all

Signature · 2 lines
With Best Regards,
Andy Shevchenko
maintainer
#25 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 7 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.

[...]

Applied to

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

Thanks!

[01/22] ASoC: codecs: rt1011: Fix definition of device_id tables

        commit: b686559772d1baa28e2ad346d5a9932863d9523c
[02/22] ASoC: codecs: rt1015: Fix definition of device_id tables
        commit: a859d2383f66002a442218bf5083faaa674bc4e4
[03/22] ASoC: codecs: rt1016: Fix definition of device_id tables
        commit: e7795c17b82684afb9390b8788f781c07be1a368
[04/22] ASoC: codecs: rt1019: Fix definition of device_id tables
        commit: 689e4d5fd8a76c676f04bc8916d78ca5db3130db
[05/22] ASoC: codecs: rt1305: Fix definition of device_id tables
        commit: 0440f938aacf54a3e7dc67cd898f76bbd371da49
[06/22] ASoC: codecs: rt1308: Fix definition of device_id tables
        commit: 30e03871146129acb75adac48405c203f5bdb3c2
[07/22] ASoC: codecs: rt1318: Fix definition of device_id tables
        commit: acac29fa62a8b738569a99da2f6458bc21aa55ae
[08/22] ASoC: codecs: rt274: Fix definition of device_id tables
        commit: 5a84cbb03094fd903ed79ca6c06e558821a69be4
[09/22] ASoC: codecs: rt5514: Fix definition of device_id tables
        commit: 1c418cf146380031b13b6fde02f944830e5b9155
[10/22] ASoC: codecs: rt5640: Fix definition of device_id tables
        commit: dfc6b8ccb1bb8d591cd26571e554208fc4af7d0c
[11/22] ASoC: codecs: rt5645: Fix definition of device_id tables
        commit: d3a37a664ebe57471bd7ab2486dd3072a9c07378
[12/22] ASoC: codecs: rt5651: Fix definition of device_id tables
        commit: 85188e3bd7cb4141181f24a59f9057c38ffa37bf
[13/22] ASoC: codecs: rt5659: Fix definition of device_id tables
        commit: 24a4302478118ff1caf39fb48809c0127f608664
[14/22] ASoC: codecs: rt5660: Fix definition of device_id tables
        commit: 4d34ea6709894243d55ae6a6b63834851f9c5d6f
[15/22] ASoC: codecs: rt5663: Fix definition of device_id tables
        commit: e9d9a43e3f00b9313013b78d915a1f97dd215bf5
[16/22] ASoC: codecs: rt5665: Fix definition of device_id tables
        commit: b89d9d26fb6cbc9f6e0aae72a2a76b5d8e5f1023
[17/22] ASoC: codecs: rt5668: Fix definition of device_id tables
        commit: a06ef7754b8e6f45d78c0015c3edb2117945adfb
[18/22] ASoC: codecs: rt5670: Fix definition of device_id tables
        commit: 9aa85f433bb1f51b599278b29b3d6224ca5147cf
[19/22] ASoC: codecs: rt5682: Fix definition of device_id tables
        commit: 6de7c4def7a6bf967d6603f7e1abda5231ccc312
[20/22] ASoC: codecs: rt286: Update definition of device_id tables
        commit: 7f15da9a55d3ba9f8c3af545246a4588102a38db
[21/22] ASoC: codecs: rt298: Update definition of device_id tables
        commit: ed4bef1d52ce0d6c96a86b6a470d6777034c564c
[22/22] ASoC: codecs: rt5677: Update definition of device_id tables
        commit: 739db0529c2a3ac5a0dc3e5a76a46ce80735dcfa

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