]> git.dujemihanovic.xyz Git - u-boot.git/commit
i2c: designware_i2c: Check if the device is powered
authorRaul E Rangel <rrangel@chromium.org>
Wed, 22 Apr 2020 16:13:54 +0000 (10:13 -0600)
committerHeiko Schocher <hs@denx.de>
Thu, 28 May 2020 03:50:47 +0000 (05:50 +0200)
commitf6f9a016899e62cb65016421a09fd3fe06ce660f
tree7299dc642a1add52341f36fbae4c008dbf8e1dcf
parentbcf08503f571553074a4e9563977225446c183fa
i2c: designware_i2c: Check if the device is powered

If the device doesn't return a version that means the device is
non-functional.

The dw_i2c_regs had invalid offsets for the version field. I got the
correct value from the DesignWare databook. It also matches what the
Picasso PPR says.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested on chromebook_coral:
Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/i2c/designware_i2c.c