media: tc358743: Check I2C succeeded during probe
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 11 Jun 2025 18:37:15 +0000 (19:37 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 17 Jun 2025 08:50:00 +0000 (10:50 +0200)
commit303d81635e1d9c949b370215cc94526ed81f2e3d
treed68e3bf788d089bf361470b48d44403246578598
parent86addd25314a1e77dbdcfddfeed0bab2f27da0e2
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.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/tc358743.c