ti: common: board_detect: Set alen to expected value before i2c read
authorCooper Jr., Franklin <fcooper@ti.com>
Thu, 20 Apr 2017 15:25:45 +0000 (10:25 -0500)
committerHeiko Schocher <hs@denx.de>
Tue, 9 May 2017 07:04:39 +0000 (09:04 +0200)
commite25ae3224f0119bf65eac8bf4e15e887e29940e8
tree598b10b8c75d849c3904e609d480f38d21004e1a
parentc6b80b13924adc9b72fb03c368c2e39b85131a91
ti: common: board_detect: Set alen to expected value before i2c read

In non DM I2C read operations the address length passed in during a read
operation will be used automatically. However, in DM I2C the address length
is set to a default value of one which causes problems when trying to
perform a read with a differing alen. Therefore, before the first read in a
series of read operations set the alen to the correct value.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
board/ti/common/board_detect.c