]> 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:26:00 +0000 (16:26 +0200)
commit668f52845081decabb8bba016f6c2e427aeb726e
tree6f0a0f58e393f4d7e1504e383611366e6cb2a8b8
parent02696d807b569b72106c9e82169f3e81a4635c36
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