Patch "i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz" has been added to the 6.1-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

    i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz

to the 6.1-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:
     i2c-force-elan06fa-touchpad-i2c-bus-freq-to-100khz.patch
and it can be found in the queue-6.1 subdirectory.

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



commit ec02b4c0e89e03c387cdbb285ca320f2c9da941f
Author: Randolph Ha <rha051117@xxxxxxxxx>
Date:   Mon Jan 13 14:52:37 2025 -0500

    i2c: Force ELAN06FA touchpad I2C bus freq to 100KHz
    
    [ Upstream commit bfd74cd1fbc026f04446e67d6915c7e199c2bffd ]
    
    When a 400KHz freq is used on this model of ELAN touchpad in Linux,
    excessive smoothing (similar to when the touchpad's firmware detects
    a noisy signal) is sometimes applied. As some devices' (e.g, Lenovo
    V15 G4) ACPI tables specify a 400KHz frequency for this device and
    some I2C busses (e.g, Designware I2C) default to a 400KHz freq,
    force the speed to 100KHz as a workaround.
    
    For future investigation: This problem may be related to the default
    HCNT/LCNT values given by some busses' drivers, because they are not
    specified in the aforementioned devices' ACPI tables, and because
    the device works without issues on Windows at what is expected to be
    a 400KHz frequency. The root cause of the issue is not known.
    
    Signed-off-by: Randolph Ha <rha051117@xxxxxxxxx>
    Reviewed-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
    Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 14ae0cfc325ef..d2499f302b508 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -355,6 +355,25 @@ static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {
 	{}
 };
 
+static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
+	/*
+	 * When a 400KHz freq is used on this model of ELAN touchpad in Linux,
+	 * excessive smoothing (similar to when the touchpad's firmware detects
+	 * a noisy signal) is sometimes applied. As some devices' (e.g, Lenovo
+	 * V15 G4) ACPI tables specify a 400KHz frequency for this device and
+	 * some I2C busses (e.g, Designware I2C) default to a 400KHz freq,
+	 * force the speed to 100KHz as a workaround.
+	 *
+	 * For future investigation: This problem may be related to the default
+	 * HCNT/LCNT values given by some busses' drivers, because they are not
+	 * specified in the aforementioned devices' ACPI tables, and because
+	 * the device works without issues on Windows at what is expected to be
+	 * a 400KHz frequency. The root cause of the issue is not known.
+	 */
+	{ "ELAN06FA", 0 },
+	{}
+};
+
 static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
 					   void *data, void **return_value)
 {
@@ -373,6 +392,9 @@ static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
 	if (acpi_match_device_ids(adev, i2c_acpi_force_400khz_device_ids) == 0)
 		lookup->force_speed = I2C_MAX_FAST_MODE_FREQ;
 
+	if (acpi_match_device_ids(adev, i2c_acpi_force_100khz_device_ids) == 0)
+		lookup->force_speed = I2C_MAX_STANDARD_MODE_FREQ;
+
 	return AE_OK;
 }
 




[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