iio: accel: kxsd9: Deploy proper register bit defines
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 1 Sep 2016 09:44:45 +0000 (11:44 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 18 Sep 2016 10:32:49 +0000 (11:32 +0100)
commit11adc2b218028934540be4f235a486d575d74b54
treeac32e8dd42d641d7aab0c247b31d3f187a30f355
parent0427a106a98adf94b53cc88607ceabc2ecebd2cc
iio: accel: kxsd9: Deploy proper register bit defines

There are some hardcoded register values etc in the code, define
proper bitfield definitions, and use them when getting and setting
the scale. Optimize a read/modify/write to use regmap_update_bits()
at the same time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/kxsd9.c