summaryrefslogtreecommitdiff
path: root/drivers/iio/potentiostat
diff options
context:
space:
mode:
authorNikita Yushchenko <nikita.yoush@cogentembedded.com>2017-05-19 17:48:00 +0300
committerJonathan Cameron <jic23@kernel.org>2017-05-20 17:33:52 +0100
commitee19ac340c5fdfd89c6348be4563453c61ab54a9 (patch)
tree3e3075e78b3580715c70578a36bf086fd1b02304 /drivers/iio/potentiostat
parentfa7662e1bddbded1820415907740837baa897721 (diff)
iio: hi8435: avoid garbage event at first enable
Currently, driver generates events for channels if new reading differs from previous one. This "previous value" is initialized to zero, which results into event if value is constant-one. Fix that by initializing "previous value" by reading at event enable time. This provides reliable sequence for userspace: - enable event, - AFTER THAT read current value, - AFTER THAT each event will correspond to change. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/potentiostat')
0 files changed, 0 insertions, 0 deletions