]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging:iio:adis16400: Fix product id check
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 30 Oct 2012 10:26:00 +0000 (10:26 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sun, 4 Nov 2012 15:55:37 +0000 (15:55 +0000)
commitfc8850c0a1fcbbf75cf37969be54a5c01445d9aa
tree1cd7f38d27d8e607426bad4c816376da61caa857
parentea2ccb3e0271067ae8ed213b306d7545f5d1f8ce
staging:iio:adis16400: Fix product id check

The product id check currently ANDs the read id with 0xF000 and compares the
result to the product id from the chip info. Since none of the product ids in
the chip info table end in 0x000 the check will always fail. Furthermore it is
also wrong, the product id in the PROD_ID register will always match the part
number of the device.

Some of the ADIS16XXX devices are identical from a software point of
view with the product id register having a different content. If we keep the
current scheme of storing the product id in the chip info table this would
require us to have multiple almost identical chip info table entries. So instead
this patch changes the code to parse the product id from the device name.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/imu/adis16400.h
drivers/staging/iio/imu/adis16400_core.c