]> git.baikalelectronics.ru Git - kernel.git/commit
iio: mma8452: Initialise before activating
authorMartin Fuzzey <mfuzzey@parkeon.com>
Wed, 13 May 2015 10:26:38 +0000 (12:26 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 17 May 2015 09:29:07 +0000 (10:29 +0100)
commite0c1f754432360778610ce8ca11271fa7cfd27ea
tree36fb5aa39df7e8cb8f9b460ff34d0e7d34ce44ae
parentd5f22bb29aebd468e91c678c9a8c426689478ffd
iio: mma8452: Initialise before activating

Many of the hardware configuration registers may only be modified while the
device is inactive.

Currently the probe code first activates the device and then modifies the
registers (eg to set the scale). This doesn't actually work but is not
noticed since the scale used is the default value.

While at it also issue a hardware reset command at probe time.

Signed-off-by: Martin Fuzzey <mfuzzey@parkeon.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/mma8452.c