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

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

 



From: Benson Leung <bleung@xxxxxxxxxxxx>

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@xxxxxxxxxxxx>
Reviewed-on: https://gerrit.chromium.org/gerrit/22990
Reviewed-by: Yufeng Shen <miletus@xxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux