iio:accel:stk8312: check for invalid value
authorHartmut Knaack <knaack.h@gmx.de>
Mon, 27 Jul 2015 22:49:22 +0000 (00:49 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sun, 2 Aug 2015 18:13:49 +0000 (19:13 +0100)
commitb41e63cf83affa50a6141eba52be1fbd05f29b21
tree4078622e67dec25ee52218e8e29f282e4dc74d26
parent946448e08e2f693ff21418d92a598b7aa296816d
iio:accel:stk8312: check for invalid value

Revision 1.2 of the datasheet recommends on page 22 to only write non-zero
values read from OTP register 0x70 into AFECTRL register.

Signed-off-by: Hartmut Knaack <knaack.h@gmx.de>
Reviewed-by: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/stk8312.c