iio: adc: sc27xx: Add raw data support
authorBaolin Wang <baolin.wang@linaro.org>
Wed, 29 Aug 2018 06:04:04 +0000 (14:04 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 2 Sep 2018 08:48:25 +0000 (09:48 +0100)
commitfd2f53ebf98173d667fe6b9c2300fef8b4f72f30
treeaa54723ff00002ffdeef42b76254330f923b971e
parent91d05d7639f388bbed90076299867e85e983f298
iio: adc: sc27xx: Add raw data support

The headset device will use channel 20 of ADC controller to detect events,
but it needs the raw ADC data to do conversion according to its own formula.

Thus we should configure the channel mask separately and configure channel
20 as IIO_CHAN_INFO_RAW, as well as adding raw data read support.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/sc27xx_adc.c