iio: adc: max1027: Add debugfs register read support
authorMiquel Raynal <miquel.raynal@bootlin.com>
Fri, 11 Oct 2019 14:43:40 +0000 (16:43 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 15 Oct 2019 20:11:03 +0000 (21:11 +0100)
commit038696f8bd2f2ed188827fbcfec3a38f8a2aea4f
tree9db6b03cb1734e01e80da818b33719a403443b3b
parent3565435455762160f19ca20769d767d9df7d8717
iio: adc: max1027: Add debugfs register read support

Until now, only write operations were supported. Force two bytes read
operation when reading, which should fit most of the development
purposes. Of course, extended operations like buffered reads on
multiple channels or even temperature + voltage reads will not be read
entirely. Usually, just starting a new operation will work but in any
case a software reset (done through the debufs interface too) will
return the device in a usable state.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/max1027.c