]> git.baikalelectronics.ru Git - kernel.git/commit
[media] em28xx: respect the message size constraints for i2c transfers
authorFrank Schaefer <fschaefer.oss@googlemail.com>
Thu, 3 Jan 2013 17:27:02 +0000 (14:27 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 5 Jan 2013 03:13:29 +0000 (01:13 -0200)
commit2bb7ccdbaa1e581369538f5fff5da052101d699e
tree494eb875735be1d44d1cf369b95c1f9b471b94f0
parentc060d9118c98e1456b7f1c83c2995e04c48856df
[media] em28xx: respect the message size constraints for i2c transfers

The em2800 can transfer up to 4 bytes per i2c message.
All other em25xx/em27xx/28xx chips can transfer at least 64 bytes per message.
I2C adapters should never split messages transferred via the I2C subsystem
into multiple message transfers, because the result will almost always NOT be
the same as when the whole data is transferred to the I2C client in a single
message.
If the message size exceeds the capabilities of the I2C adapter, -EOPNOTSUPP
should be returned.

Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/em28xx/em28xx-i2c.c