summaryrefslogtreecommitdiffstats
path: root/include/linux/s3c_adc_battery.h
Commit message (Collapse)AuthorAgeFilesLines
* s3c_adc_battery: Average over more than one adc sampleHeiko Stübner2012-01-061-0/+4
| | | | | | | | | | | | | | | 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 <heiko@sntech.de> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* s3c_adc_battery: Add gpio_inverted field to pdataVasily Khoruzhick2010-12-221-0/+1
| | | | | | | | Add support for inverted gpio_charge_finished values. This change is necessary for H1940 support. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* Add s3c-adc-battery driverVasily Khoruzhick2010-07-231-0/+36
s3c-adc-battery is driver for monitoring and charging battery on iPAQ H1930/H1940/RX1950. It depends on s3c-adc driver to get battery voltage and current. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>