Patch "platform/x86: intel: hid: Always call BTNL ACPI method" has been added to the 6.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    platform/x86: intel: hid: Always call BTNL ACPI method

to the 6.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     platform-x86-intel-hid-always-call-btnl-acpi-method.patch
and it can be found in the queue-6.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit af24f6e5759cd8e497c6dde2dacf00acf2dc7112
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Sat Jul 15 20:15:16 2023 +0200

    platform/x86: intel: hid: Always call BTNL ACPI method
    
    [ Upstream commit e3ab18de2b09361d6f0e4aafb9cfd6d002ce43a1 ]
    
    On a HP Elite Dragonfly G2 the 0xcc and 0xcd events for SW_TABLET_MODE
    are only send after the BTNL ACPI method has been called.
    
    Likely more devices need this, so make the BTNL ACPI method unconditional
    instead of only doing it on devices with a 5 button array.
    
    Note this also makes the intel_button_array_enable() call in probe()
    unconditional, that function does its own priv->array check. This makes
    the intel_button_array_enable() call in probe() consistent with the calls
    done on suspend/resume which also rely on the priv->array check inside
    the function.
    
    Reported-by: Maxim Mikityanskiy <maxtram95@xxxxxxxxx>
    Closes: https://lore.kernel.org/platform-driver-x86/20230712175023.31651-1-maxtram95@xxxxxxxxx/
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230715181516.5173-1-hdegoede@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/platform/x86/intel/hid.c b/drivers/platform/x86/intel/hid.c
index 5632bd3c534a3..641f2797406e1 100644
--- a/drivers/platform/x86/intel/hid.c
+++ b/drivers/platform/x86/intel/hid.c
@@ -620,7 +620,7 @@ static bool button_array_present(struct platform_device *device)
 static int intel_hid_probe(struct platform_device *device)
 {
 	acpi_handle handle = ACPI_HANDLE(&device->dev);
-	unsigned long long mode;
+	unsigned long long mode, dummy;
 	struct intel_hid_priv *priv;
 	acpi_status status;
 	int err;
@@ -692,18 +692,15 @@ static int intel_hid_probe(struct platform_device *device)
 	if (err)
 		goto err_remove_notify;
 
-	if (priv->array) {
-		unsigned long long dummy;
+	intel_button_array_enable(&device->dev, true);
 
-		intel_button_array_enable(&device->dev, true);
-
-		/* Call button load method to enable HID power button */
-		if (!intel_hid_evaluate_method(handle, INTEL_HID_DSM_BTNL_FN,
-					       &dummy)) {
-			dev_warn(&device->dev,
-				 "failed to enable HID power button\n");
-		}
-	}
+	/*
+	 * Call button load method to enable HID power button
+	 * Always do this since it activates events on some devices without
+	 * a button array too.
+	 */
+	if (!intel_hid_evaluate_method(handle, INTEL_HID_DSM_BTNL_FN, &dummy))
+		dev_warn(&device->dev, "failed to enable HID power button\n");
 
 	device_init_wakeup(&device->dev, true);
 	/*



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux