diff mbox

CHROMIUM: drm/i915/intel_i2c: Allow 400khz for atmel mxt bl on VGADDC

Message ID 1376613069-15790-30-git-send-email-james.ausmus@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Ausmus Aug. 16, 2013, 12:30 a.m. UTC
From: Benson Leung <bleung@chromium.org>

The atmel_mxt_ts bootloader mode can support 400khz operation
successfully. Enable it for bootloader at address 0x25 on the
VGADDC adapter.

BUG=chrome-os-partner:9994
TEST=place valid atmel mxt firmware at /lib/firmware/maxtouch.fw
time echo 1 > update_fw
Check that firmware update succeeds, and that the time is less than 9s.
time echo 1 > update_fw

real	0m8.450s
user	0m0.001s
sys	0m0.100s

Change-Id: I52373189e051c265ce32a99cee8b139f51721b28
Signed-off-by: Benson Leung <bleung@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/23760
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
---
 drivers/gpu/drm/i915/intel_i2c.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 6d9364c..a18837f 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -346,10 +346,12 @@  gmbus_xfer(struct i2c_adapter *adapter,
 	/* Hack to use 400kHz only for touch i2c devices on ddc ports */
 	gmbus0 = bus->reg0;
 	if (((gmbus0 & GMBUS_PORT_MASK) == GMBUS_PORT_VGADDC &&
-	     (msgs[0].addr == 0x4b || msgs[0].addr == 0x67)) ||
+	     (msgs[0].addr == 0x4b || msgs[0].addr == 0x67 ||
+	      msgs[0].addr == 0x25)) ||
 	    ((gmbus0 & GMBUS_PORT_MASK) == GMBUS_PORT_PANEL &&
-	     (msgs[0].addr == 0x4a || msgs[0].addr == 0x26)))
+	     (msgs[0].addr == 0x4a || msgs[0].addr == 0x26))) {
 		gmbus0 = (gmbus0 & ~GMBUS_RATE_MASK) | GMBUS_RATE_400KHZ;
+	}
 	I915_WRITE(GMBUS0 + reg_offset, gmbus0);
 
 	for (i = 0; i < num; i++) {