Skip to content

Commit cdbbca2

Browse files
committed
Merge tag 'acpi-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull ACPI fixes from Rafael Wysocki: "These add one more ACPI IRQ override quirk, improve ACPI companion lookup for backlight devices and add missing kernel command line option values for backlight detection. Specifics: - Improve ACPI companion lookup for backlight devices in the cases when there is more than one candidate ACPI device object (Hans de Goede) - Add missing support for manual selection of NVidia-WMI-EC or Apple GMUX backlight in the kernel command line to the ACPI backlight driver (Hans de Goede) - Skip ACPI IRQ override on Asus Expertbook B2402CBA (Tamim Khan)" * tag 'acpi-6.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI: Fix selecting wrong ACPI fwnode for the iGPU on some Dell laptops ACPI: video: Allow selecting NVidia-WMI-EC or Apple GMUX backlight from the cmdline ACPI: resource: Skip IRQ override on Asus Expertbook B2402CBA
2 parents 0d0833e + df3a71a commit cdbbca2

File tree

5 files changed

+30
-5
lines changed

5 files changed

+30
-5
lines changed

drivers/acpi/glue.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ static struct acpi_bus_type *acpi_get_bus_type(struct device *dev)
7575
}
7676

7777
#define FIND_CHILD_MIN_SCORE 1
78-
#define FIND_CHILD_MAX_SCORE 2
78+
#define FIND_CHILD_MID_SCORE 2
79+
#define FIND_CHILD_MAX_SCORE 3
7980

8081
static int match_any(struct acpi_device *adev, void *not_used)
8182
{
@@ -96,8 +97,17 @@ static int find_child_checks(struct acpi_device *adev, bool check_children)
9697
return -ENODEV;
9798

9899
status = acpi_evaluate_integer(adev->handle, "_STA", NULL, &sta);
99-
if (status == AE_NOT_FOUND)
100+
if (status == AE_NOT_FOUND) {
101+
/*
102+
* Special case: backlight device objects without _STA are
103+
* preferred to other objects with the same _ADR value, because
104+
* it is more likely that they are actually useful.
105+
*/
106+
if (adev->pnp.type.backlight)
107+
return FIND_CHILD_MID_SCORE;
108+
100109
return FIND_CHILD_MIN_SCORE;
110+
}
101111

102112
if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_ENABLED))
103113
return -ENODEV;

drivers/acpi/resource.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,13 @@ static const struct dmi_system_id asus_laptop[] = {
432432
DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
433433
},
434434
},
435+
{
436+
.ident = "Asus ExpertBook B2402CBA",
437+
.matches = {
438+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
439+
DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"),
440+
},
441+
},
435442
{
436443
.ident = "Asus ExpertBook B2502",
437444
.matches = {

drivers/acpi/scan.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,9 +1370,12 @@ static void acpi_set_pnp_ids(acpi_handle handle, struct acpi_device_pnp *pnp,
13701370
* Some devices don't reliably have _HIDs & _CIDs, so add
13711371
* synthetic HIDs to make sure drivers can find them.
13721372
*/
1373-
if (acpi_is_video_device(handle))
1373+
if (acpi_is_video_device(handle)) {
13741374
acpi_add_id(pnp, ACPI_VIDEO_HID);
1375-
else if (acpi_bay_match(handle))
1375+
pnp->type.backlight = 1;
1376+
break;
1377+
}
1378+
if (acpi_bay_match(handle))
13761379
acpi_add_id(pnp, ACPI_BAY_HID);
13771380
else if (acpi_dock_match(handle))
13781381
acpi_add_id(pnp, ACPI_DOCK_HID);

drivers/acpi/video_detect.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ static void acpi_video_parse_cmdline(void)
5050
acpi_backlight_cmdline = acpi_backlight_video;
5151
if (!strcmp("native", acpi_video_backlight_string))
5252
acpi_backlight_cmdline = acpi_backlight_native;
53+
if (!strcmp("nvidia_wmi_ec", acpi_video_backlight_string))
54+
acpi_backlight_cmdline = acpi_backlight_nvidia_wmi_ec;
55+
if (!strcmp("apple_gmux", acpi_video_backlight_string))
56+
acpi_backlight_cmdline = acpi_backlight_apple_gmux;
5357
if (!strcmp("none", acpi_video_backlight_string))
5458
acpi_backlight_cmdline = acpi_backlight_none;
5559
}

include/acpi/acpi_bus.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ struct acpi_pnp_type {
230230
u32 hardware_id:1;
231231
u32 bus_address:1;
232232
u32 platform_id:1;
233-
u32 reserved:29;
233+
u32 backlight:1;
234+
u32 reserved:28;
234235
};
235236

236237
struct acpi_device_pnp {

0 commit comments

Comments
 (0)