From: Heiko Stübner Date: Thu, 29 Dec 2011 11:52:07 +0000 (+0100) Subject: s3c_adc_battery: Average over more than one adc sample X-Git-Tag: v3.3-rc1~98^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34aed73df3a9e75e313a7510b201f6755ae3e6bc;p=pandora-kernel.git s3c_adc_battery: Average over more than one adc sample Some sources for adc battery information provide only inaccurate results where the read value differs from the real value with positive and negative offsets. For such sources it can be more accurate to collect two or more value sample and use the average of all collected values. This patch adds pdata options volt_samples, current_samples and backup_volt_samples to specifiy the number of samples to collect, reads the specified number of samples and calculates the average of those. For unset sample-number-values a default of 1 is assumed. Signed-off-by: Heiko Stuebner Signed-off-by: Anton Vorontsov --- Reading git-diff-tree failed