[Intel-gfx] [PATCH] CHROMIUM: drm/i915/intel_i2c: Allow 400khz for cyapa

james.ausmus at intel.com james.ausmus at intel.com
Fri Aug 16 02:30:53 CEST 2013


From: Benson Leung <bleung at chromium.org>

Allow 400khz mode on port2, VGADDC address 0x67 for
cyapa i2c touchpads. This will improve firmware
update speed.

BUG=chrome-os-partner:9798
TEST=time echo 1 > /sys/bus/i2c/devices/2-0067/update_fw
Check that the update firmware succeeds, and the time
taken was:
real	0m13.823s
user	0m0.000s
sys	0m0.121s

Change-Id: I38afaef60f1421003a1e54f4108f465ba4ce7899
Signed-off-by: Benson Leung <bleung at chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/22990
Reviewed-by: Yufeng Shen <miletus at chromium.org>
---
 drivers/gpu/drm/i915/intel_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 364204f..6d9364c 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -343,10 +343,10 @@ gmbus_xfer(struct i2c_adapter *adapter,
 
 	reg_offset = dev_priv->gpio_mmio_base;
 
-	/* Hack to use 400kHz only for atmel_mxt i2c devices on ddc ports */
+	/* 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 == 0x4b || msgs[0].addr == 0x67)) ||
 	    ((gmbus0 & GMBUS_PORT_MASK) == GMBUS_PORT_PANEL &&
 	     (msgs[0].addr == 0x4a || msgs[0].addr == 0x26)))
 		gmbus0 = (gmbus0 & ~GMBUS_RATE_MASK) | GMBUS_RATE_400KHZ;
-- 
1.8.3.2




More information about the Intel-gfx mailing list