]> git.baikalelectronics.ru Git - kernel.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)
commit6242f94b8a9d5d5fa33311f66f885202f0d2a510
treeb84cf4f38c21825bcfdcba02a23f5216680c69fb
parent858d24097d6d79cca900c3dd8775327bc3d3d1ff
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