• Lars-Peter Clausen's avatar
    iio:imu:adis: Add paging support · 484a0bf0
    Lars-Peter Clausen authored
    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: default avatarLars-Peter Clausen <lars@metafoo.de>
    Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
    484a0bf0
adis.c 9.66 KB