]> git.baikalelectronics.ru Git - kernel.git/commit
iio: accel: bmc150: Always restore device to normal mode after suspend-resume
authorHans de Goede <hdegoede@redhat.com>
Thu, 13 Jul 2017 13:13:41 +0000 (15:13 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Jul 2017 20:36:54 +0000 (21:36 +0100)
commit66d3c5f6c3015607553a3a24292755d572a63671
tree001e94c2c7c7c837a52303dac4243e39b1479f6a
parent0d0d715254e552c3cf037f674ac0266937bde07e
iio: accel: bmc150: Always restore device to normal mode after suspend-resume

After probe we would put the device in normal mode, after a runtime
suspend-resume we would put it back in normal mode. But for a regular
suspend-resume we would only put it back in normal mode if triggers
or events have been requested.  This is not consistent and breaks
reading raw values after a suspend-resume.

This commit changes the regular resume path to also unconditionally put
the device back in normal mode, fixing reading of raw values not working
after a regular suspend-resume cycle.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/bmc150-accel-core.c