diff options
author | Johan Palsson <johan.palsson@stericsson.com> | 2011-02-03 11:24:59 +0100 |
---|---|---|
committer | Jonas ABERG <jonas.aberg@stericsson.com> | 2011-02-07 10:24:30 +0100 |
commit | 27646ade4b39f17c2040b836a9304cab2280939a (patch) | |
tree | f6d233c1c4219ac58820d572c360ac6fd03c6527 /sound | |
parent | ea0c5fc93a9679b4152e322b5672103a00ed41fb (diff) |
misc: ab8500_gpadc: Use calibrated ADC values from OTP
Three ADC channels are calibrated in factory and the parameters
are stored in OTP. These parameters are now read and used in
the GPADC driver. Also the function ab8500_gpadc_convert now returns
a voltage instead of a raw AD-value
ST-Ericsson ID: WP322611
ST-Ericsson FOSS-OUT ID: Trivial
Change-Id: I600faf8b30122a6dd95048c1059b33623f37aeeb
Signed-off-by: Johan Palsson <johan.palsson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/14191
Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/ux500/ux500_ab8500_accessory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/ux500/ux500_ab8500_accessory.c b/sound/soc/ux500/ux500_ab8500_accessory.c index ab022144a1f..de5a14dfbf7 100644 --- a/sound/soc/ux500/ux500_ab8500_accessory.c +++ b/sound/soc/ux500/ux500_ab8500_accessory.c @@ -701,9 +701,9 @@ void update_jack_status(enum accessory_jack_state jack_status) */ static int meas_voltage(u8 input) { - int raw_vol = ab8500_gpadc_convert(devdata->ab8500->gpadc, input); + int vol = ab8500_gpadc_convert(devdata->ab8500->gpadc, input); - return (raw_vol * 2500)/1023; + return vol; } /* |