]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: tc358743: Check I2C succeeded during probe
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 11 Jun 2025 18:37:15 +0000 (19:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Aug 2025 14:28:27 +0000 (16:28 +0200)
commit5c809ef89e1ba2c3132e959382a3c22f0f62d5f9
tree66cb7fa008e028bd985a375d0ba2be43397aeee6
parent815cb5818eef436a2d98ce3821cb3b55bb9501bc
media: tc358743: Check I2C succeeded during probe

[ Upstream commit 303d81635e1d9c949b370215cc94526ed81f2e3d ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/tc358743.c