From ae01e2fb2c63cfdeeeeb70a0ba5380a11895240f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 22 Sep 2009 09:52:29 +0200 Subject: [PATCH] Add jz4740-adc.h --- .../files-2.6.31/include/linux/jz4740-adc.h | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 target/linux/xburst/files-2.6.31/include/linux/jz4740-adc.h diff --git a/target/linux/xburst/files-2.6.31/include/linux/jz4740-adc.h b/target/linux/xburst/files-2.6.31/include/linux/jz4740-adc.h new file mode 100644 index 000000000..59cfe634f --- /dev/null +++ b/target/linux/xburst/files-2.6.31/include/linux/jz4740-adc.h @@ -0,0 +1,25 @@ + +#ifndef __LINUX_JZ4740_ADC +#define __LINUX_JZ4740_ADC + +#include + +enum jz_adc_battery_scale { + JZ_ADC_BATTERY_SCALE_2V5, /* Mesures voltages up to 2.5V */ + JZ_ADC_BATTERY_SCALE_7V5, /* Mesures voltages up to 7.5V */ +}; + +/* + * jz4740_adc_read_battery_voltage - Read battery voltage from the ADC PBAT pin + * @dev: Pointer to a jz4740-adc device + * @scale: Whether to use 2.5V or 7.5V scale + * + * Returns: Battery voltage in mircovolts + * + * Context: Process +*/ +long jz4740_adc_read_battery_voltage(struct device *dev, + enum jz_adc_battery_scale scale); + + +#endif