]> git.sur5r.net Git - u-boot/commit
i2c: tegra: use repeated start for reads
authorStephen Warren <swarren@nvidia.com>
Wed, 25 Jun 2014 16:57:27 +0000 (10:57 -0600)
committerHeiko Schocher <hs@denx.de>
Thu, 3 Jul 2014 04:29:19 +0000 (06:29 +0200)
commit68049a082b8aedf09e769e61885e000e598bb516
tree26780e2fead018bee3b9e1d9a9f25f41e47d401a
parentfe8b3212b7938861eacdefe6115810303a96f9cc
i2c: tegra: use repeated start for reads

I2C read transactions are typically implemented as follows:

START(write) address REPEATED_START(read) data... STOP

However, Tegra's I2C driver currently implements reads as follows:

START(write) address STOP START(read) data... STOP

This sequence confuses at least the AS3722 PMIC on the Jetson TK1 board,
leading to corrupted read data in some cases. Fix the driver to chain
the transactions together using repeated starts to solve this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Yen Lin <yelin@nvidia.com>
arch/arm/include/asm/arch-tegra/tegra_i2c.h
drivers/i2c/tegra_i2c.c