diff options
author | Frank Schaefer | 2017-04-16 14:41:52 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2017-04-17 17:29:51 -0300 |
commit | 4d58443696a8e2a4bcae3fc6d32b0bee71ad9fa1 (patch) | |
tree | 6681476d6b0059959209face2f786e29bb6b84b7 /drivers/media/usb/em28xx/em28xx.h | |
parent | e7080d4471d805d921a9ea21b32f911a91e248cb (diff) |
[media] em28xx: simplify ID-reading from Micron sensors
Use i2c_smbus_read_word_data() instead of i2c_master_send() and
i2c_master_recv() for reading the ID of Micorn sensors.
i2c_smbus_read_word_data() assumes that byes are in little-endian,
so, it uses:
data->word = msgbuf1[0] | (msgbuf1[1] << 8);
However, Micron datasheet describes the ID as if they were read
in big-endian. So, we need to change the byte order in order to
match the ID number as described on their datasheets.
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx.h')
0 files changed, 0 insertions, 0 deletions