public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] ACPI: scan: Create platform device for CS35L56
@ 2023-07-28 11:13 Richard Fitzgerald
  2023-07-28 15:31 ` Rafael J. Wysocki
  2023-07-31 14:09 ` Hans de Goede
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Fitzgerald @ 2023-07-28 11:13 UTC (permalink / raw)
  To: rafael, hdegoede
  Cc: linux-acpi, linux-kernel, platform-driver-x86, patches,
	Simon Trimmer, Richard Fitzgerald

From: Simon Trimmer <simont@opensource.cirrus.com>

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.

There can be a 5th I2cSerialBusV2, but this is an alias address and doesn't
represent a real device. Ignore this by having a dummy 5th entry in the
serial-multi-instantiate instance list with the name of a non-existent
driver, on the same pattern as done for bsg2150.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
---
 drivers/acpi/scan.c                             |  1 +
 drivers/platform/x86/serial-multi-instantiate.c | 14 ++++++++++++++
 2 files changed, 15 insertions(+)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 5b145f1aaa1b..87e385542576 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -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 */
diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c
index 2c2abf69f049..8158e3cf5d6d 100644
--- a/drivers/platform/x86/serial-multi-instantiate.c
+++ b/drivers/platform/x86/serial-multi-instantiate.c
@@ -329,6 +329,19 @@ static const struct smi_node cs35l41_hda = {
 	.bus_type = SMI_AUTO_DETECT,
 };
 
+static const struct smi_node cs35l56_hda = {
+	.instances = {
+		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
+		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
+		/* a 5th entry is an alias address, not a real device */
+		{ "cs35l56-hda_dummy_dev" },
+		{}
+	},
+	.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().
@@ -337,6 +350,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 },
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] ACPI: scan: Create platform device for CS35L56
  2023-07-28 11:13 [PATCH v3] ACPI: scan: Create platform device for CS35L56 Richard Fitzgerald
@ 2023-07-28 15:31 ` Rafael J. Wysocki
  2023-07-31 14:09 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2023-07-28 15:31 UTC (permalink / raw)
  To: Richard Fitzgerald
  Cc: rafael, hdegoede, linux-acpi, linux-kernel, platform-driver-x86,
	patches, Simon Trimmer

On Fri, Jul 28, 2023 at 1:13 PM Richard Fitzgerald
<rf@opensource.cirrus.com> wrote:
>
> From: Simon Trimmer <simont@opensource.cirrus.com>
>
> 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.
>
> There can be a 5th I2cSerialBusV2, but this is an alias address and doesn't
> represent a real device. Ignore this by having a dummy 5th entry in the
> serial-multi-instantiate instance list with the name of a non-existent
> driver, on the same pattern as done for bsg2150.
>
> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>

Still ACKed.

> ---
>  drivers/acpi/scan.c                             |  1 +
>  drivers/platform/x86/serial-multi-instantiate.c | 14 ++++++++++++++
>  2 files changed, 15 insertions(+)
>
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 5b145f1aaa1b..87e385542576 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -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 */
> diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c
> index 2c2abf69f049..8158e3cf5d6d 100644
> --- a/drivers/platform/x86/serial-multi-instantiate.c
> +++ b/drivers/platform/x86/serial-multi-instantiate.c
> @@ -329,6 +329,19 @@ static const struct smi_node cs35l41_hda = {
>         .bus_type = SMI_AUTO_DETECT,
>  };
>
> +static const struct smi_node cs35l56_hda = {
> +       .instances = {
> +               { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +               { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +               { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +               { "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +               /* a 5th entry is an alias address, not a real device */
> +               { "cs35l56-hda_dummy_dev" },
> +               {}
> +       },
> +       .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().
> @@ -337,6 +350,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 },
> --
> 2.30.2
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] ACPI: scan: Create platform device for CS35L56
  2023-07-28 11:13 [PATCH v3] ACPI: scan: Create platform device for CS35L56 Richard Fitzgerald
  2023-07-28 15:31 ` Rafael J. Wysocki
@ 2023-07-31 14:09 ` Hans de Goede
  1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2023-07-31 14:09 UTC (permalink / raw)
  To: Richard Fitzgerald, rafael
  Cc: linux-acpi, linux-kernel, platform-driver-x86, patches,
	Simon Trimmer

Hi,

On 7/28/23 13:13, Richard Fitzgerald wrote:
> From: Simon Trimmer <simont@opensource.cirrus.com>
> 
> 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.
> 
> There can be a 5th I2cSerialBusV2, but this is an alias address and doesn't
> represent a real device. Ignore this by having a dummy 5th entry in the
> serial-multi-instantiate instance list with the name of a non-existent
> driver, on the same pattern as done for bsg2150.
> 
> Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>

Thank you for your patch, I've applied this patch to my fixes
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=fixes

Note it will show up in my fixes branch once I've pushed my
local branch there, which might take a while.

I will include this patch in my next fixes pull-req to Linus
for the current kernel development cycle.

Regards,

Hans




> ---
>  drivers/acpi/scan.c                             |  1 +
>  drivers/platform/x86/serial-multi-instantiate.c | 14 ++++++++++++++
>  2 files changed, 15 insertions(+)
> 
> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
> index 5b145f1aaa1b..87e385542576 100644
> --- a/drivers/acpi/scan.c
> +++ b/drivers/acpi/scan.c
> @@ -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 */
> diff --git a/drivers/platform/x86/serial-multi-instantiate.c b/drivers/platform/x86/serial-multi-instantiate.c
> index 2c2abf69f049..8158e3cf5d6d 100644
> --- a/drivers/platform/x86/serial-multi-instantiate.c
> +++ b/drivers/platform/x86/serial-multi-instantiate.c
> @@ -329,6 +329,19 @@ static const struct smi_node cs35l41_hda = {
>  	.bus_type = SMI_AUTO_DETECT,
>  };
>  
> +static const struct smi_node cs35l56_hda = {
> +	.instances = {
> +		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +		{ "cs35l56-hda", IRQ_RESOURCE_AUTO, 0 },
> +		/* a 5th entry is an alias address, not a real device */
> +		{ "cs35l56-hda_dummy_dev" },
> +		{}
> +	},
> +	.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().
> @@ -337,6 +350,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 },


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-31 14:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-28 11:13 [PATCH v3] ACPI: scan: Create platform device for CS35L56 Richard Fitzgerald
2023-07-28 15:31 ` Rafael J. Wysocki
2023-07-31 14:09 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox