Skip to content

Commit 3679d9d

Browse files
committed
Merge tag 'platform-drivers-x86-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Ilpo Järvinen: "Fixes: - intel/hid: Solve spurious hibernation aborts (power button release) - toshiba_acpi: Ignore 2 keys to avoid log noise during suspend/resume - intel-vbtn: Fix probe by restoring VBDL and VGBS evalutation order - lg-laptop: Fix W=1 %s null argument warning New HW Support: - acer-wmi: PH18-71 mode button and fan speed sensor - intel/hid: Lunar Lake and Arrow Lake HID IDs" * tag 'platform-drivers-x86-v6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: lg-laptop: fix %s null argument warning platform/x86: intel-vbtn: Update tablet mode switch at end of probe platform/x86: intel-vbtn: Use acpi_has_method to check for switch platform/x86: toshiba_acpi: Silence logging for some events platform/x86/intel/hid: Add Lunar Lake and Arrow Lake support platform/x86/intel/hid: Don't wake on 5-button releases platform/x86: acer-wmi: Add support for Acer PH18-71
2 parents 2c71fdf + e71c848 commit 3679d9d

File tree

5 files changed

+25
-10
lines changed

5 files changed

+25
-10
lines changed

drivers/platform/x86/acer-wmi.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,15 @@ static const struct dmi_system_id acer_quirks[] __initconst = {
597597
},
598598
.driver_data = &quirk_acer_predator_v4,
599599
},
600+
{
601+
.callback = dmi_matched,
602+
.ident = "Acer Predator PH18-71",
603+
.matches = {
604+
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
605+
DMI_MATCH(DMI_PRODUCT_NAME, "Predator PH18-71"),
606+
},
607+
.driver_data = &quirk_acer_predator_v4,
608+
},
600609
{
601610
.callback = set_force_caps,
602611
.ident = "Acer Aspire Switch 10E SW3-016",

drivers/platform/x86/intel/hid.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ static const struct acpi_device_id intel_hid_ids[] = {
4949
{"INTC1076", 0},
5050
{"INTC1077", 0},
5151
{"INTC1078", 0},
52+
{"INTC107B", 0},
53+
{"INTC10CB", 0},
5254
{"", 0},
5355
};
5456
MODULE_DEVICE_TABLE(acpi, intel_hid_ids);
@@ -504,6 +506,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
504506
struct platform_device *device = context;
505507
struct intel_hid_priv *priv = dev_get_drvdata(&device->dev);
506508
unsigned long long ev_index;
509+
struct key_entry *ke;
507510
int err;
508511

509512
/*
@@ -545,11 +548,15 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
545548
if (event == 0xc0 || !priv->array)
546549
return;
547550

548-
if (!sparse_keymap_entry_from_scancode(priv->array, event)) {
551+
ke = sparse_keymap_entry_from_scancode(priv->array, event);
552+
if (!ke) {
549553
dev_info(&device->dev, "unknown event 0x%x\n", event);
550554
return;
551555
}
552556

557+
if (ke->type == KE_IGNORE)
558+
return;
559+
553560
wakeup:
554561
pm_wakeup_hard_event(&device->dev);
555562

drivers/platform/x86/intel/vbtn.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ static int intel_vbtn_input_setup(struct platform_device *device)
136136
priv->switches_dev->id.bustype = BUS_HOST;
137137

138138
if (priv->has_switches) {
139-
detect_tablet_mode(&device->dev);
140-
141139
ret = input_register_device(priv->switches_dev);
142140
if (ret)
143141
return ret;
@@ -258,18 +256,14 @@ static const struct dmi_system_id dmi_switches_allow_list[] = {
258256

259257
static bool intel_vbtn_has_switches(acpi_handle handle, bool dual_accel)
260258
{
261-
unsigned long long vgbs;
262-
acpi_status status;
263-
264259
/* See dual_accel_detect.h for more info */
265260
if (dual_accel)
266261
return false;
267262

268263
if (!dmi_check_system(dmi_switches_allow_list))
269264
return false;
270265

271-
status = acpi_evaluate_integer(handle, "VGBS", NULL, &vgbs);
272-
return ACPI_SUCCESS(status);
266+
return acpi_has_method(handle, "VGBS");
273267
}
274268

275269
static int intel_vbtn_probe(struct platform_device *device)
@@ -316,6 +310,9 @@ static int intel_vbtn_probe(struct platform_device *device)
316310
if (ACPI_FAILURE(status))
317311
dev_err(&device->dev, "Error VBDL failed with ACPI status %d\n", status);
318312
}
313+
// Check switches after buttons since VBDL may have side effects.
314+
if (has_switches)
315+
detect_tablet_mode(&device->dev);
319316

320317
device_init_wakeup(&device->dev, true);
321318
/*

drivers/platform/x86/lg-laptop.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ static int acpi_add(struct acpi_device *device)
736736
default:
737737
year = 2019;
738738
}
739-
pr_info("product: %s year: %d\n", product, year);
739+
pr_info("product: %s year: %d\n", product ?: "unknown", year);
740740

741741
if (year >= 2019)
742742
battery_limit_use_wmbb = 1;

drivers/platform/x86/toshiba_acpi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ static const struct key_entry toshiba_acpi_keymap[] = {
264264
{ KE_KEY, 0xb32, { KEY_NEXTSONG } },
265265
{ KE_KEY, 0xb33, { KEY_PLAYPAUSE } },
266266
{ KE_KEY, 0xb5a, { KEY_MEDIA } },
267+
{ KE_IGNORE, 0x0e00, { KEY_RESERVED } }, /* Wake from sleep */
267268
{ KE_IGNORE, 0x1430, { KEY_RESERVED } }, /* Wake from sleep */
268269
{ KE_IGNORE, 0x1501, { KEY_RESERVED } }, /* Output changed */
269270
{ KE_IGNORE, 0x1502, { KEY_RESERVED } }, /* HDMI plugged/unplugged */
@@ -3523,9 +3524,10 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event)
35233524
(dev->kbd_mode == SCI_KBD_MODE_ON) ?
35243525
LED_FULL : LED_OFF);
35253526
break;
3527+
case 0x8e: /* Power button pressed */
3528+
break;
35263529
case 0x85: /* Unknown */
35273530
case 0x8d: /* Unknown */
3528-
case 0x8e: /* Unknown */
35293531
case 0x94: /* Unknown */
35303532
case 0x95: /* Unknown */
35313533
default:

0 commit comments

Comments
 (0)