I'm bringing up ADV7610 on Linux Kernel v4.14 on TI AM5728 platform. The Kernel module for this device is failing to successfully probe the device:
[ 4081.446593] adv7604 0-004c: GPIO lookup for consumer reset [ 4081.446598] adv7604 0-004c: using device tree for GPIO lookup [ 4081.466818] adv7611 0-004c: Error -121 reading IO Regmap
I've learned that the ADV7610 uses repeated start/stop transfers. This is the raw traffic during driver initialization by reading the
0xEA (hardware ID) which the value is
modprobe-2124  .... 4055.146719: regmap_hw_read_done: 0-004c reg=ea count=1 modprobe-2131  .... 4081.466725: regmap_hw_read_start: 0-004c reg=ea count=1 modprobe-2131  .... 4081.466733: i2c_write: i2c-0 #0 a=04c f=0000 l=1 [ea] modprobe-2131  .... 4081.466734: i2c_read: i2c-0 #1 a=04c f=0001 l=1 modprobe-2131  .... 4081.466811: i2c_result: i2c-0 n=0 ret=-121 modprobe-2131  .... 4081.466814: regmap_hw_read_done: 0-004c reg=ea count=1
You can see above that the driver is not receiving any data (n=0). This also explains why i2cdetect fails to detect the device (it simply writes slave address on the bus in read mode).
On the other hand, i2cget command works because it handles repeated start/stop:
i2cget-2021  .... 538.751863: i2c_write: i2c-0 #0 a=04c f=0000 l=1 [ea] i2cget-2021  .... 538.751867: i2c_read: i2c-0 #1 a=04c f=0001 l=1 i2cget-2021  .... 538.752202: i2c_reply: i2c-0 #1 a=04c f=0001 l=1  i2cget-2021  .... 538.752204: i2c_result: i2c-0 n=2 ret=2
You can see above that the i2c_reply (repeated start) gets sent before reading the correct data back(i2c_result … n=2) in the next line.
I'm puzzled because I actually do not suspect there is a bug in either the Linux regmap/i2c subsystem or in the driver itself (adv7604.c). However, that doesn't leave much room for error. What might be going on here..?