Skip to contentSkip to conversation

ACPI: scan: Create platform device for CS35L56

PATCH Superseded Richard Fitzgerald 3 participants 5 messages Jul 26, 2023 – Jul 27, 2023

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: scan: Create platform device for CS35L56

From: Simon Trimmer <[email protected]>

The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which is used in multiples, and can be connected either to I2C or SPI.

There will be multiple instances under the same Device() node. Add it to ignore_serial_bus_ids and handle it in the serial-multi-instantiate driver.

---
 drivers/acpi/scan.c                             |  1 +
 drivers/platform/x86/serial-multi-instantiate.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)
drivers/acpi/scan.c +1 -0
index 5b145f1aaa1b..87e385542576 100644
@@ -1714,6 +1714,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
 		{"BSG1160", },
 		{"BSG2150", },
 		{"CSC3551", },
+		{"CSC3556", },
 		{"INT33FE", },
 		{"INT3515", },
 		/* Non-conforming _HID for Cirrus Logic already released */
drivers/platform/x86/serial-multi-instantiate.c +12 -0
index f3dcbdd72fec..dcf2914b97c9 100644
@@ -316,6 +316,17 @@ static const struct smi_node cs35l41_hda = {
 	.bus_type = SMI_AUTO_DETECT,
 };
 
+static const struct smi_node cs35l56_hda = {
+	.instances = {
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{}
+	},
+	.bus_type = SMI_AUTO_DETECT,
+};
+
 /*
  * Note new device-ids must also be added to ignore_serial_bus_ids in
  * drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
@@ -324,6 +335,7 @@ static const struct acpi_device_id smi_acpi_ids[] = {
 	{ "BSG1160", (unsigned long)&bsg1160_data },
 	{ "BSG2150", (unsigned long)&bsg2150_data },
 	{ "CSC3551", (unsigned long)&cs35l41_hda },
+	{ "CSC3556", (unsigned long)&cs35l56_hda },
 	{ "INT3515", (unsigned long)&int3515_data },
 	/* Non-conforming _HID for Cirrus Logic already released */
 	{ "CLSA0100", (unsigned long)&cs35l41_hda },
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw

Hi Richard,

Quoted 11 lines · Richard Fitzgerald

From: Simon Trimmer <[email protected]>

The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which is used in multiples, and can be connected either to I2C or SPI.

There will be multiple instances under the same Device() node. Add it to ignore_serial_bus_ids and handle it in the serial-multi-instantiate driver.

Thanks, patch looks good to me:

I have 1 other serial-multi-instantiate.c patches in my fixes branch (see below) and since this just adds new hw-ids I think this can go upstream through my fixes branch too.

Rafael, do you agree with me taking this upstream as a 6.5 fix? And if yes may I have your ack for that ?

About that 1 patch, that adds a new IRQ type: IRQ_RESOURCE_AUTO and I wonder if this patch should not use that same new type right from the start:

https://git.kernel.org/pub/scm/linux/kernel/agit/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=676b7c5ecab36274442887ceadd6dee8248a244f

This makes me realize that I should probably have pinged you and ask for feedback on that patch since it was send by a community member rather then by Cirrus. Note this is currently in Linus' master tree, so any fixes to it need to be submitted on top (not that I expect any issues since it still behaves as before on acpi_dev_gpio_irq_get() success and only adds an platform_get_irq() fallback when that fails).

Regards,

Hans

Quoted 47 lines
---
 drivers/acpi/scan.c                             |  1 +
 drivers/platform/x86/serial-multi-instantiate.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)
drivers/acpi/scan.c +1 -0
index 5b145f1aaa1b..87e385542576 100644
@@ -1714,6 +1714,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
 		{"BSG1160", },
 		{"BSG2150", },
 		{"CSC3551", },
+		{"CSC3556", },
 		{"INT33FE", },
 		{"INT3515", },
 		/* Non-conforming _HID for Cirrus Logic already released */
drivers/platform/x86/serial-multi-instantiate.c +12 -0
index f3dcbdd72fec..dcf2914b97c9 100644
@@ -316,6 +316,17 @@ static const struct smi_node cs35l41_hda = {
 	.bus_type = SMI_AUTO_DETECT,
 };
 
+static const struct smi_node cs35l56_hda = {
+	.instances = {
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+		{}
+	},
+	.bus_type = SMI_AUTO_DETECT,
+};
+
 /*
  * Note new device-ids must also be added to ignore_serial_bus_ids in
  * drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
@@ -324,6 +335,7 @@ static const struct acpi_device_id smi_acpi_ids[] = {
 	{ "BSG1160", (unsigned long)&bsg1160_data },
 	{ "BSG2150", (unsigned long)&bsg2150_data },
 	{ "CSC3551", (unsigned long)&cs35l41_hda },
+	{ "CSC3556", (unsigned long)&cs35l56_hda },
 	{ "INT3515", (unsigned long)&int3515_data },
 	/* Non-conforming _HID for Cirrus Logic already released */
 	{ "CLSA0100", (unsigned long)&cs35l41_hda },
maintainer Acked-by
#2 lore raw
Quoted 16 lines · Hans de Goede

Hi Richard,

Quoted 11 lines · Richard Fitzgerald

From: Simon Trimmer <[email protected]>

The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which is used in multiples, and can be connected either to I2C or SPI.

There will be multiple instances under the same Device() node. Add it to ignore_serial_bus_ids and handle it in the serial-multi-instantiate driver.

Quoted 7 lines

Thanks, patch looks good to me:

I have 1 other serial-multi-instantiate.c patches in my fixes branch (see below) and since this just adds new hw-ids I think this can go upstream through my fixes branch too.

Rafael, do you agree with me taking this upstream as a 6.5 fix? And if yes may I have your ack for that ?

Sure.

Quoted 60 lines

About that 1 patch, that adds a new IRQ type: IRQ_RESOURCE_AUTO and I wonder if this patch should not use that same new type right from the start:

https://git.kernel.org/pub/scm/linux/kernel/agit/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=676b7c5ecab36274442887ceadd6dee8248a244f

This makes me realize that I should probably have pinged you and ask for feedback on that patch since it was send by a community member rather then by Cirrus. Note this is currently in Linus' master tree, so any fixes to it need to be submitted on top (not that I expect any issues since it still behaves as before on acpi_dev_gpio_irq_get() success and only adds an platform_get_irq() fallback when that fails).

Regards,

Hans

Quoted 47 lines
---
 drivers/acpi/scan.c                             |  1 +
 drivers/platform/x86/serial-multi-instantiate.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)
drivers/acpi/scan.c +1 -0
index 5b145f1aaa1b..87e385542576 100644
@@ -1714,6 +1714,7 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
              {"BSG1160", },
              {"BSG2150", },
              {"CSC3551", },
+             {"CSC3556", },
              {"INT33FE", },
              {"INT3515", },
              /* Non-conforming _HID for Cirrus Logic already released */
drivers/platform/x86/serial-multi-instantiate.c +12 -0
index f3dcbdd72fec..dcf2914b97c9 100644
@@ -316,6 +316,17 @@ static const struct smi_node cs35l41_hda = {
      .bus_type = SMI_AUTO_DETECT,
 };
 
+static const struct smi_node cs35l56_hda = {
+     .instances = {
+             { "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+             { "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+             { "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+             { "cs35l56-hda", IRQ_RESOURCE_GPIO, 0 },
+             {}
+     },
+     .bus_type = SMI_AUTO_DETECT,
+};
+
 /*
  * Note new device-ids must also be added to ignore_serial_bus_ids in
  * drivers/acpi/scan.c: acpi_device_enumeration_by_parent().
@@ -324,6 +335,7 @@ static const struct acpi_device_id smi_acpi_ids[] = {
      { "BSG1160", (unsigned long)&bsg1160_data },
      { "BSG2150", (unsigned long)&bsg2150_data },
      { "CSC3551", (unsigned long)&cs35l41_hda },
+     { "CSC3556", (unsigned long)&cs35l56_hda },
      { "INT3515", (unsigned long)&int3515_data },
      /* Non-conforming _HID for Cirrus Logic already released */
      { "CLSA0100", (unsigned long)&cs35l41_hda },
#3 lore raw
In reply to Hans de Goede
Quoted 19 lines · Hans de Goede

Hi Richard,

Quoted 11 lines · Richard Fitzgerald

From: Simon Trimmer <[email protected]>

The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which is used in multiples, and can be connected either to I2C or SPI.

There will be multiple instances under the same Device() node. Add it to ignore_serial_bus_ids and handle it in the serial-multi-instantiate driver.

Thanks, patch looks good to me:

Quoted 8 lines

I have 1 other serial-multi-instantiate.c patches in my fixes branch (see below) and since this just adds new hw-ids I think this can go upstream through my fixes branch too.

Rafael, do you agree with me taking this upstream as a 6.5 fix? And if yes may I have your ack for that ?

About that 1 patch, that adds a new IRQ type: IRQ_RESOURCE_AUTO and I wonder if this patch should not use that same new type right from the start:

https://git.kernel.org/pub/scm/linux/kernel/agit/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=676b7c5ecab36274442887ceadd6dee8248a244f

Link doesn't work, but I think you mean:
https://lore.kernel.org/platform-driver-x86/[email protected]/T/#t

I'll send a V2 of this CS35L56 patch to use the new IRQ_RESOURCE_AUTO.

#4 lore raw

Hi,

Quoted 24 lines · Richard Fitzgerald
Quoted 23 lines · Hans de Goede

Hi Richard,

Quoted 11 lines · Richard Fitzgerald

From: Simon Trimmer <[email protected]>

The ACPI device CSC3556 is a Cirrus Logic CS35L56 mono amplifier which is used in multiples, and can be connected either to I2C or SPI.

There will be multiple instances under the same Device() node. Add it to ignore_serial_bus_ids and handle it in the serial-multi-instantiate driver.

Thanks, patch looks good to me:

I have 1 other serial-multi-instantiate.c patches in my fixes branch (see below) and since this just adds new hw-ids I think this can go upstream through my fixes branch too.

Rafael, do you agree with me taking this upstream as a 6.5 fix? And if yes may I have your ack for that ?

Quoted 7 lines
Quoted 4 lines

About that 1 patch, that adds a new IRQ type: IRQ_RESOURCE_AUTO and I wonder if this patch should not use that same new type right from the start:

https://git.kernel.org/pub/scm/linux/kernel/agit/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=676b7c5ecab36274442887ceadd6dee8248a244f

Link doesn't work, but I think you mean:
https://lore.kernel.org/platform-driver-x86/[email protected]/T/#t

Right an "a" (probably from ctrl + a) snuk in there, correct link:

https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=676b7c5ecab36274442887ceadd6dee8248a244f

Which is indeed the same patch as you linked.

Quoted 1 line

I'll send a V2 of this CS35L56 patch to use the new IRQ_RESOURCE_AUTO.

Thanks.

Regards,

Hans