OSDN Git Service

Make sure accelerometer driver returns accordingly if attempted frequency is not...
authorAdriana Reus <adriana.reus@intel.com>
Tue, 16 Jul 2013 13:32:23 +0000 (16:32 +0300)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 18 Mar 2014 01:48:21 +0000 (09:48 +0800)
commitd7d04ba92006da0d09d0a0948d6a47a1ba4c4196
tree2aea27c4d1f2d8f23784bb90c8966eed36a8d665
parentcb8ccbaa6ad07a99bec1dba4dc9d3657494047e7
Make sure accelerometer driver returns accordingly if attempted frequency is not valid.

This is a workaround for a suspected firmware issue.
If a bigger value than supported is attempted to be set it is
silently discarded, and the write function in the driver returns normally
even though it was unsuccessfull.

This patch double checks a value by also reading the field and checking if it was
set accordingly.

Issue: AXIA-3061
Change-Id: Ief11af31994e26f4bc9c4d6b05023623192aaa2f
Original-Change-Id: I1b52a1a176079962caedc4f084e57f9765c7f45b
Signed-off-by: Adriana Reus <adriana.reus@intel.com>
drivers/iio/common/hid-sensors/hid-sensor-attributes.c