power: tps80031-battery: add new power supply properties
syed rafiuddin [Tue, 27 Sep 2011 19:59:48 +0000 (00:59 +0530)]
- Addition of temperature, charge_now and charge counter
 properties to fuel-gauge controller
- Fixed the voltage reading as linux power class requires
 uV as voltage unit instead of mV

bug 872686, 872697

Reviewed-on: http://git-master/r/56988
(cherry picked from commit df7b02de84e4665516caed2f1e00da60d868b1de)

Change-Id: Iabad1f4fdc0431a3070d8ee3558aaf010e667853
Reviewed-on: http://git-master/r/61860
Reviewed-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Tested-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

Rebase-Id: R22835889ceb86d00cf19c0abeab5d95323d2fd9e

include/linux/mfd/tps80031.h

index d888e46..9f9af00 100644 (file)
@@ -68,6 +68,28 @@ enum {
        TPS80031_INT_NR,
 };
 
+enum adc_channel {
+       BATTERY_TYPE                    = 0,  /* External ADC */
+       BATTERY_TEMPERATURE             = 1,  /* External ADC */
+       AUDIO_ACCESSORY                 = 2,  /* External ADC */
+       TEMPERATURE_EXTERNAL_DIODE      = 3,  /* External ADC */
+       TEMPERATURE_MEASUREMENT         = 4,  /* External ADC */
+       GENERAL_PURPOSE_1               = 5,  /* External ADC */
+       GENERAL_PURPOSE_2               = 6,  /* External ADC */
+       SYSTEM_SUPPLY                   = 7,  /* Internal ADC */
+       BACKUP_BATTERY                  = 8,  /* Internal ADC */
+       EXTERNAL_CHARGER_INPUT          = 9,  /* Internal ADC */
+       VBUS                            = 10, /* Internal ADC */
+       VBUS_DCDC_OUTPUT_CURRENT        = 11, /* Internal ADC */
+       DIE_TEMPERATURE_1               = 12, /* Internal ADC */
+       DIE_TEMPERATURE_2               = 13, /* Internal ADC */
+       USB_ID_LINE                     = 14, /* Internal ADC */
+       TEST_NETWORK_1                  = 15, /* Internal ADC */
+       TEST_NETWORK_2                  = 16, /* Internal ADC */
+       BATTERY_CHARGING_CURRENT        = 17, /* Internal ADC */
+       BATTERY_VOLTAGE                 = 18, /* Internal ADC */
+};
+
 enum TPS80031_GPIO {
        TPS80031_GPIO_REGEN1,
        TPS80031_GPIO_REGEN2,