Skip to content

Commit 09741de

Browse files
Jacopo Mondimchehab
authored andcommitted
media: i2c: rdacm20: Enable noise immunity
Enable the noise immunity threshold at the end of the rdacm20 initialization routine. The rdacm20 camera module has been so far tested with a startup delay that allowed the embedded MCU to program the serializer. If the initialization routine is run before the MCU programs the serializer and the image sensor and their addresses gets changed by the rdacm20 driver it is required to manually enable the noise immunity threshold to make the communication on the control channel more reliable. Signed-off-by: Jacopo Mondi <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Kieran Bingham <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 1524bb7 commit 09741de

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/media/i2c/rdacm20.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,19 @@ static int rdacm20_initialize(struct rdacm20_device *dev)
539539

540540
dev_info(dev->dev, "Identified MAX9271 + OV10635 device\n");
541541

542-
return 0;
542+
/*
543+
* Set reverse channel high threshold to increase noise immunity.
544+
*
545+
* This should be compensated by increasing the reverse channel
546+
* amplitude on the remote deserializer side.
547+
*
548+
* TODO Inspect the embedded MCU programming sequence to make sure
549+
* there are no conflicts with the configuration applied here.
550+
*
551+
* TODO Clarify the embedded MCU startup delay to avoid write
552+
* collisions on the I2C bus.
553+
*/
554+
return max9271_set_high_threshold(&dev->serializer, true);
543555
}
544556

545557
static int rdacm20_probe(struct i2c_client *client)

0 commit comments

Comments
 (0)