[PORT FROM R2] nfc: split long i2c xfers into smaller chunks supported by i2c controller
authorSebastian Niciarz <sebastian.niciarz@intel.com>
Fri, 24 Feb 2012 10:26:02 +0000 (11:26 +0100)
committerbuildbot <buildbot@intel.com>
Fri, 2 Mar 2012 15:36:11 +0000 (07:36 -0800)
commitf8e6cd58e3cb69d6b02acbc92d7119a61e39d60c
treedfc7b286e38e096c7fb04f74bda30b2436a5c51b
parentd9bd4c133503cb037bad11abdb3754b7997b56e4
[PORT FROM R2] nfc: split long i2c xfers into smaller chunks supported by i2c controller

BZ: 23876

Due to limitation of I2C silicon on Penwell I2C xfers longer than 31 bytes
are not guaranteed to be atomic. If TX fifo underrun occurs during such
a transfer I2C controller will automatically generate a STOP condition.

This patch splits all long I2C transfer requested by NFC stack into chunks
of up to 31 bytes and transmits them as separate I2C transfers.

Change-Id: I9801081ee275d57ce00e86d1dc310e391e73bd27
Orig-Change-Id: I2533a7e61110c34107e963d5fb2444b64dc70fb4
Signed-off-by: Sebastian Niciarz <sebastian.niciarz@intel.com>
Signed-off-by: Dejan REBRACA <dejanx.rebraca@intel.com>
Reviewed-on: http://android.intel.com:8080/36616
Reviewed-by: Monroy, German <german.monroy@intel.com>
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Reviewed-by: Wahid, KenX <kenx.wahid@intel.com>
Reviewed-by: Yang, Bin <bin.yang@intel.com>
Tested-by: Zurmely, PierreX <pierrex.zurmely@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/nfc/pn544.c