diff mbox

Fix for Dell P57G touchpad found, need advice on patch

Message ID 20150917093239.GH1536@lahna.fi.intel.com
State Not Applicable
Headers show

Commit Message

Mika Westerberg Sept. 17, 2015, 9:32 a.m. UTC
On Wed, Sep 16, 2015 at 11:40:39AM +0300, Mika Westerberg wrote:
> Can you send me acpidump of that machine (or contents of
> /sys/firmware/acpi/tables/DSDT)? It may be that the ACPI I2cSerialBus
> connector actually has 100kHz there - we just don't use it currently.

Thanks for the DSDT.

All touchpads seem to have 400kHz set in their I2cSerialBus connectors :-(

Can you try the below patch and see if it changes anything? One suspect
is that instead of running wrong frequency, timings for fast mode are
not correct. The below patch will force the driver to use calculated
ones (based on the DW I2C datasheet).

Please also attach dmesg from the test run.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 3dd2de31a2f8..3ef19477e37e 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -91,6 +91,15 @@  static int dw_i2c_acpi_configure(struct platform_device *pdev)
 	dw_i2c_acpi_params(pdev, "FMCN", &dev->fs_hcnt, &dev->fs_lcnt,
 			   &dev->sda_hold_time);
 
+	dev_info(&pdev->dev, "ACPI SSCN %u:%u\n", dev->ss_hcnt, dev->ss_lcnt);
+	dev_info(&pdev->dev, "ACPI FMCN %u:%u\n", dev->fs_hcnt, dev->fs_lcnt);
+	dev_info(&pdev->dev, "ACPI SDA hold %u\n", dev->sda_hold_time);
+
+	/* Use defaults */
+	dev->ss_hcnt = dev->ss_lcnt = 0;
+	dev->fs_hcnt = dev->fs_lcnt = 0;
+	dev->sda_hold_time = 0;
+
 	/*
 	 * Provide a way for Designware I2C host controllers that are not
 	 * based on Intel LPSS to specify their input clock frequency via