]> git.baikalelectronics.ru Git - kernel.git/commit
iio: adc: spmi-vadc: Changes to support different scaling
authorRama Krishna Phani A <rphani@codeaurora.org>
Fri, 9 Dec 2016 15:01:50 +0000 (20:31 +0530)
committerJonathan Cameron <jic23@kernel.org>
Sat, 10 Dec 2016 17:28:21 +0000 (17:28 +0000)
commit431566b64917725f14ef92a2537a4df14bbf4dce
treece6f4e5919e24921e157921607e9aae3292bfe1b
parent8fed14fa9b219f4bf0d3237091a98bba05be2d78
iio: adc: spmi-vadc: Changes to support different scaling

Several ADC channels are supported in PMIC which can be used to
measure voltage, temperature, current etc. Different scaling can be
applied on the obtained voltage to report in physical units. Scaling
functionality can be different per channel. Add scaling support per
channel. Every channel present in adc has an unique conversion formula
for obtained voltage. Add support to report in Raw as well as in
processed format. Scaling is applied when processed read is requested
and is not applied when a Raw read is requested.

Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/qcom-spmi-vadc.c