Re: s5h1411_readreg: readreg error (ret == -5)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 7 Jun 2009, Roger wrote:

> >From looking at "linux/drivers/media/dvb/frontends/s5h1411.c",  The
> s5h1411_readreg wants to see "2" but is getting "-5" from the i2c bus.
> 
> --- Snip ---
> 
> s5h1411_readreg: readreg error (ret == -5)
> pvrusb2: unregistering DVB devices
> device: 'dvb0.net0': device_unregister
> 
> --- Snip ---
> 
> What exactly does this mean?

Roger:

It means that the module attempted an I2C transfer and the transfer 
failed.  The I2C adapter within the pvrusb2 driver will return either 
the number of bytes that it transferred or a failure code.  The failure 
code, as is normal convention in the kernel, will be a negated errno 
value.  Thus the expected value of 2 would be the fact that it probably 
tried a 2 byte transfer, while the actual value returned of -5 indicate 
an EIO error, which is what the pvrusb2 driver will return when the 
underlying I2C transaction has failed.

Of course the real question is not that it failed but why it failed.  
And for that I unfortunately do not have an answer.  It's possible that 
the s5h1411 driver did something that the chip didn't like and the chip 
responded by going deaf on the I2C bus.  More than a few I2C-driven 
parts can behave this way.  It's also possible that the part might have 
been busy and unable to respond - but usually in that case the driver 
for such a part will be written with this in mind and will know how / 
when to communicate with the hardware.

  -Mike


-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux