]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iio:imu:adis: Add paging support
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 20 Nov 2012 13:36:00 +0000 (13:36 +0000)
committerJonathan Cameron <jic23@kernel.org>
Tue, 20 Nov 2012 21:26:37 +0000 (21:26 +0000)
commit484a0bf091c93c379e6524a17bb037c33c898e01
treeb84cf4f38c21825bcfdcba02a23f5216680c69fb
parent9caed0d9d6db12cb6d81ba68d5bc98432d6b4711
iio:imu:adis: Add paging support

Some of the newer generation devices from the ADIS16XXX series have more
registers than what can be supported with the current register addressing
scheme. These devices implement register paging to support a larger register
range. Each page is 128 registers large and the currently active page can be
selected via register 0x00 in each page. This patch implements transparent
paging inside the common adis library. The register read/write interface stays
the same and when a register is accessed the library automatically switches to
the correct page if it is not already selected. The page number is encoded in
the upper bits of the register number, e.g. register 0x5 of page 1 is 0x85.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/adis.c
drivers/iio/imu/adis_buffer.c
include/linux/iio/imu/adis.h