[PORT FROM R2] atmel_mxt224: limit i2c read write block size to 30 bytes
authorHong Liu <hong.liu@intel.com>
Thu, 5 Apr 2012 05:49:58 +0000 (13:49 +0800)
committerbuildbot <buildbot@intel.com>
Wed, 11 Apr 2012 09:54:32 +0000 (02:54 -0700)
commit3178fb7e22fe433898cda1bbfac99fb12ec4ce90
treeb67ae223c0d74a5bef65b4e414fbc35a236a34de
parent556bc95486b538df6b09d3cca659c5fb3f40440f
[PORT FROM R2] atmel_mxt224: limit i2c read write block size to 30 bytes

BZ: 30319

The designware i2c controller only supports 32 bytes read/write due to
hardware limitation, we need to split big i2c block read/write into
several 32-byte trunk to avoid i2c "TX FIFO overrun" error.

Since mxt224 uses 16bit address, this leaves 30 bytes for data read/write.

Change-Id: I7e9998d90b0432709224926933e91328ce4a1672
Signed-off-by: Hong Liu <hong.liu@intel.com>
Reviewed-on: http://android.intel.com:8080/42859
Reviewed-by: Du, Alek <alek.du@intel.com>
Tested-by: Wang, Zhifeng <zhifeng.wang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/input/touchscreen/atmel_mxt224.c