]> git.baikalelectronics.ru Git - uboot.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)
commit96d170758b318fb02f512c865dfddb7a7c421251
tree7299dc642a1add52341f36fbae4c008dbf8e1dcf
parent2d5659d0664cc2093413124601900a8e287f72f5
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