aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJohan Palsson <johan.palsson@stericsson.com>2011-01-27 16:29:51 +0100
committerHenrik Aberg <henrik.aberg@stericsson.com>2011-02-11 12:22:10 +0100
commit423950ac8e036c30d2f194961c4202e9f39d7bc1 (patch)
tree25c74e6706c0c534cefc9a8f23b8f44880726a89 /include
parentf6271145de62daabe437add6515ed9125275d7ae (diff)
power: ab8500_bm: Support for measuring temperature on BAT_CTRL
Temperature is now measured using the internal current sources in AB8500. This will enable us to measure temperature in the battery with higher precision ST-Ericsson ID: WP320571 ST-Ericsson FOSS-OUT ID: Trivial Change-Id: I2ebbf60ae8a03f7a0ddd7a6dce778ee93d5559d7 Signed-off-by: Johan Palsson <johan.palsson@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/13637 Reviewed-by: QATOOLS Reviewed-by: Johan GARDSMARK <johan.gardsmark@stericsson.com> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/ab8500.h3
-rw-r--r--include/linux/mfd/ab8500/ab8500-bm.h13
2 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/mfd/ab8500.h b/include/linux/mfd/ab8500.h
index e77fee98b88..cd0e6967586 100644
--- a/include/linux/mfd/ab8500.h
+++ b/include/linux/mfd/ab8500.h
@@ -141,7 +141,6 @@
/* Forward declaration */
struct ab8500_gpadc;
struct ab8500_charger;
-struct ab8500_fg;
/**
* struct ab8500 - ab8500 internal structure
@@ -158,7 +157,6 @@ struct ab8500_fg;
* @oldmask: cache of previous IRQ regs for bus lock
* @gpadc: pointer to the ab8500 gpadc device information.
* @charger: pointer to the charger driver device information.
- * @fg: pointer to the fg driver device information.
*/
struct ab8500 {
struct device *dev;
@@ -179,7 +177,6 @@ struct ab8500 {
struct ab8500_gpadc *gpadc;
struct ab8500_charger *charger;
- struct ab8500_fg *fg;
};
struct regulator_init_data;
diff --git a/include/linux/mfd/ab8500/ab8500-bm.h b/include/linux/mfd/ab8500/ab8500-bm.h
index cc0f8564aac..d7ae3819fa1 100644
--- a/include/linux/mfd/ab8500/ab8500-bm.h
+++ b/include/linux/mfd/ab8500/ab8500-bm.h
@@ -46,6 +46,7 @@
#define AB8500_LED_INDICATOR_PWM_CTRL 0x53
#define AB8500_LED_INDICATOR_PWM_DUTY 0x54
#define AB8500_BATT_OVV 0x55
+#define AB8500_BAT_CTRL_CURRENT_SOURCE 0x60 /*Only in Cut2.0*/
/*
* Charger / main control register offsets
@@ -212,6 +213,13 @@
/* RTC constants */
#define RTC_BUP_CH_ENA 0x10
+/* BatCtrl Current Source Constants */
+#define BAT_CTRL_7U_ENA 0x01
+#define BAT_CTRL_20U_ENA 0x02
+#define BAT_CTRL_CMP_ENA 0x04
+#define FORCE_BAT_CTRL_CMP_HIGH 0x08
+#define BAT_CTRL_PULL_UP_ENA 0x10
+
/* Battery type */
#define BATTERY_UNKNOWN 00
@@ -259,10 +267,6 @@ struct ab8500_charger_ops {
int (*kick_watchdog) (struct ab8500_charger *);
};
-struct ab8500_fg_ops {
- int (*get_inst_curr) (struct ab8500_fg *);
-};
-
/**
* struct ab8500_fg_parameters - Fuel gauge algorithm parameters, in seconds
* if not specified
@@ -389,7 +393,6 @@ struct ab8500_bm_data {
struct res_to_temp *pcb_ntc;
struct battery_type *bat_type;
struct ab8500_charger_ops charger_ops;
- struct ab8500_fg_ops fg_ops;
const struct ab8500_fg_parameters *fg_params;
};