diff mbox series

[3/4] ACPI: resource: Fold Asus ExpertBook B1402C* and B1502C* DMI quirks together

Message ID 20241005212819.354681-4-hdegoede@redhat.com
State Accepted
Commit 158d0f3700fd7190df609a0a61294f29ae698d9e
Headers show
Series ACPI: resource: Improve Asus skip IRQ override quirks | expand

Commit Message

Hans de Goede Oct. 5, 2024, 9:28 p.m. UTC
Asus has 2 ExpertBook B1402C models:

B1402CBA with 12th gen Intel CPUs
B1402CVA with 13th gen Intel CPUs

Fold the 2 DMI quirks for these into a single quirk to reduce the number
of quirks.

Likewise Asus has 3 ExpertBook B1502C models:

B1502CBA with 12th gen Intel CPUs
B1502CGA with 12th gen Intel N-series CPUs
B1502CVA with 13th gen Intel CPUs

Fold the 3 DMI quirks for these into a single quirk to reduce the number
of quirks.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/resource.c | 29 ++++-------------------------
 1 file changed, 4 insertions(+), 25 deletions(-)

Comments

Luke Jones Oct. 7, 2024, 11:45 p.m. UTC | #1
On Sun, 6 Oct 2024, at 10:28 AM, Hans de Goede wrote:
> Asus has 2 ExpertBook B1402C models:
>
> B1402CBA with 12th gen Intel CPUs
> B1402CVA with 13th gen Intel CPUs
>
> Fold the 2 DMI quirks for these into a single quirk to reduce the number
> of quirks.
>
> Likewise Asus has 3 ExpertBook B1502C models:
>
> B1502CBA with 12th gen Intel CPUs
> B1502CGA with 12th gen Intel N-series CPUs
> B1502CVA with 13th gen Intel CPUs
>
> Fold the 3 DMI quirks for these into a single quirk to reduce the number
> of quirks.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/acpi/resource.c | 29 ++++-------------------------
>  1 file changed, 4 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
> index 0eb52e372467..2c17d3ea4d3c 100644
> --- a/drivers/acpi/resource.c
> +++ b/drivers/acpi/resource.c
> @@ -448,40 +448,19 @@ static const struct dmi_system_id 
> irq1_level_low_skip_override[] = {
>  		},
>  	},
>  	{
> -		/* Asus ExpertBook B1402CBA */
> +		/* Asus ExpertBook B1402C* */
>  		.matches = {
>  			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> -			DMI_MATCH(DMI_BOARD_NAME, "B1402CBA"),
> +			DMI_MATCH(DMI_BOARD_NAME, "B1402C"),
>  		},
>  	},
>  	{
> -		/* Asus ExpertBook B1402CVA */
> +		/* Asus ExpertBook B1502C* */
>  		.matches = {
>  			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> -			DMI_MATCH(DMI_BOARD_NAME, "B1402CVA"),
> +			DMI_MATCH(DMI_BOARD_NAME, "B1502C"),
>  		},
>  	},
> -	{
> -		/* Asus ExpertBook B1502CBA */
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> -			DMI_MATCH(DMI_BOARD_NAME, "B1502CBA"),
> -		},
> -	},
> -	{
> -		/* Asus ExpertBook B1502CGA */
> -		.matches = {
> -			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
> -			DMI_MATCH(DMI_BOARD_NAME, "B1502CGA"),
> -		},
> -	},
> -        {
> -                /* Asus ExpertBook B1502CVA */
> -                .matches = {
> -                        DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER 
> INC."),
> -                        DMI_MATCH(DMI_BOARD_NAME, "B1502CVA"),
> -                },
> -        },
>  	{
>  		/* Asus ExpertBook B2402 (B2402CBA / B2402FBA / B2402CVA / B2402FVA) 
> */
>  		.matches = {
> -- 
> 2.46.2

All patch look good. This does make me wonder if perhaps there are more places still in the kernel where the DMI matching can be further reduced.

My experience in the last 5 years of working on ASUS products is that they tend to be fairly consistent and not deviate from their model numbering scheme or the "base platform" that the variants are built on - the model number base does increment if the platform changes in some way (typically mobo or chip changes).

Regards,
Luke.
diff mbox series

Patch

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index 0eb52e372467..2c17d3ea4d3c 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -448,40 +448,19 @@  static const struct dmi_system_id irq1_level_low_skip_override[] = {
 		},
 	},
 	{
-		/* Asus ExpertBook B1402CBA */
+		/* Asus ExpertBook B1402C* */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-			DMI_MATCH(DMI_BOARD_NAME, "B1402CBA"),
+			DMI_MATCH(DMI_BOARD_NAME, "B1402C"),
 		},
 	},
 	{
-		/* Asus ExpertBook B1402CVA */
+		/* Asus ExpertBook B1502C* */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-			DMI_MATCH(DMI_BOARD_NAME, "B1402CVA"),
+			DMI_MATCH(DMI_BOARD_NAME, "B1502C"),
 		},
 	},
-	{
-		/* Asus ExpertBook B1502CBA */
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-			DMI_MATCH(DMI_BOARD_NAME, "B1502CBA"),
-		},
-	},
-	{
-		/* Asus ExpertBook B1502CGA */
-		.matches = {
-			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-			DMI_MATCH(DMI_BOARD_NAME, "B1502CGA"),
-		},
-	},
-        {
-                /* Asus ExpertBook B1502CVA */
-                .matches = {
-                        DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
-                        DMI_MATCH(DMI_BOARD_NAME, "B1502CVA"),
-                },
-        },
 	{
 		/* Asus ExpertBook B2402 (B2402CBA / B2402FBA / B2402CVA / B2402FVA) */
 		.matches = {