iio: hx711: add triggered buffer support

Add buffer to device data struct and add trigger function

Data format is quite simple:
      voltage - channel 0   32 Bit
      voltage - channel 1   32 Bit
      timestamp             64 Bit

Using both channels at the same time is working quite slow because of
changing the channel which needs a dummy read.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andreas Klinger 2017-12-13 18:10:11 +01:00 • committed by Greg Kroah-Hartman
commit d3bf60450d
2 changed files with 100 additions and 23 deletions