media: tc358743: Check I2C succeeded during probe.
authorDave Stevenson <dave.stevenson@raspberrypi.org>
Wed, 31 Oct 2018 14:57:34 +0000 (14:57 +0000)
committerpopcornmix <popcornmix@gmail.com>
Wed, 27 Jan 2021 19:12:57 +0000 (19:12 +0000)
commitaac2b3103bc069782c4dcaf9e0640c45c5b33903
treef33629fc9384a298cdcf8f8dd42b2cb3d1fab0f2
parent38154a4578a57890b33e1da48579950a4e1bf55b
media: tc358743: Check I2C succeeded during probe.

The probe for the TC358743 reads the CHIPID register from
the device and compares it to the expected value of 0.
If the I2C request fails then that also returns 0, so
the driver loads thinking that the device is there.

Generally I2C communications are reliable so there is
limited need to check the return value on every transfer,
therefore only amend the one read during probe to check
for I2C errors.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
drivers/media/i2c/tc358743.c