aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-08-29 08:36:51 -0400
committerLee Jones <lee.jones@linaro.org>2013-03-06 23:35:48 -0500
commit861a30da53e2c5b9823b5390c1757baaf8f6e356 (patch)
treef703602dfcfabac6f1855633aec306cf271ec7d5 /include/linux/mfd
parent2c4c40ac0052eaf9b14009635ab475362e88c6e0 (diff)
ab8500-bm: Add support for the new ab8540 platform
Provide AB8540 platform specific information required to run the Battery Management subsystem on AB8540 based devices. For this to happen we see the introduction of separate platform specific data structures and a means in which to process them. Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/abx500.h10
-rw-r--r--include/linux/mfd/abx500/ab8500-bm.h5
2 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
index cd71d8eadf50..33b0253569a3 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -246,7 +246,11 @@ struct abx500_bm_charger_parameters {
246 * @interval_not_charging charge alg cycle period time when not charging (sec) 246 * @interval_not_charging charge alg cycle period time when not charging (sec)
247 * @temp_hysteresis temperature hysteresis 247 * @temp_hysteresis temperature hysteresis
248 * @gnd_lift_resistance Battery ground to phone ground resistance (mOhm) 248 * @gnd_lift_resistance Battery ground to phone ground resistance (mOhm)
249 * @maxi: maximization parameters 249 * @n_chg_out_curr number of elements in array chg_output_curr
250 * @n_chg_in_curr number of elements in array chg_input_curr
251 * @chg_output_curr charger output current level map
252 * @chg_input_curr charger input current level map
253 * @maxi maximization parameters
250 * @cap_levels capacity in percent for the different capacity levels 254 * @cap_levels capacity in percent for the different capacity levels
251 * @bat_type table of supported battery types 255 * @bat_type table of supported battery types
252 * @chg_params charger parameters 256 * @chg_params charger parameters
@@ -281,6 +285,10 @@ struct abx500_bm_data {
281 int interval_not_charging; 285 int interval_not_charging;
282 int temp_hysteresis; 286 int temp_hysteresis;
283 int gnd_lift_resistance; 287 int gnd_lift_resistance;
288 int n_chg_out_curr;
289 int n_chg_in_curr;
290 int *chg_output_curr;
291 int *chg_input_curr;
284 const struct abx500_maxim_parameters *maxi; 292 const struct abx500_maxim_parameters *maxi;
285 const struct abx500_bm_capacity_levels *cap_levels; 293 const struct abx500_bm_capacity_levels *cap_levels;
286 struct abx500_battery_type *bat_type; 294 struct abx500_battery_type *bat_type;
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h
index 0ebf0c5d1f88..ee1c1626c886 100644
--- a/include/linux/mfd/abx500/ab8500-bm.h
+++ b/include/linux/mfd/abx500/ab8500-bm.h
@@ -33,7 +33,7 @@
33#define AB8500_CH_STATUS2_REG 0x01 33#define AB8500_CH_STATUS2_REG 0x01
34#define AB8500_CH_USBCH_STAT1_REG 0x02 34#define AB8500_CH_USBCH_STAT1_REG 0x02
35#define AB8500_CH_USBCH_STAT2_REG 0x03 35#define AB8500_CH_USBCH_STAT2_REG 0x03
36#define AB8500_CH_FSM_STAT_REG 0x04 36#define AB8540_CH_USBCH_STAT3_REG 0x04
37#define AB8500_CH_STAT_REG 0x05 37#define AB8500_CH_STAT_REG 0x05
38 38
39/* 39/*
@@ -157,6 +157,7 @@
157#define CH_OP_CUR_LVL_1P4 0x0D 157#define CH_OP_CUR_LVL_1P4 0x0D
158#define CH_OP_CUR_LVL_1P5 0x0E 158#define CH_OP_CUR_LVL_1P5 0x0E
159#define CH_OP_CUR_LVL_1P6 0x0F 159#define CH_OP_CUR_LVL_1P6 0x0F
160#define CH_OP_CUR_LVL_2P 0x3F
160 161
161/* BTEMP High thermal limits */ 162/* BTEMP High thermal limits */
162#define BTEMP_HIGH_TH_57_0 0x00 163#define BTEMP_HIGH_TH_57_0 0x00
@@ -246,6 +247,8 @@ enum bup_vch_sel {
246#define BAT_CTRL_20U_ENA 0x02 247#define BAT_CTRL_20U_ENA 0x02
247#define BAT_CTRL_18U_ENA 0x01 248#define BAT_CTRL_18U_ENA 0x01
248#define BAT_CTRL_16U_ENA 0x02 249#define BAT_CTRL_16U_ENA 0x02
250#define BAT_CTRL_60U_ENA 0x01
251#define BAT_CTRL_120U_ENA 0x02
249#define BAT_CTRL_CMP_ENA 0x04 252#define BAT_CTRL_CMP_ENA 0x04
250#define FORCE_BAT_CTRL_CMP_HIGH 0x08 253#define FORCE_BAT_CTRL_CMP_HIGH 0x08
251#define BAT_CTRL_PULL_UP_ENA 0x10 254#define BAT_CTRL_PULL_UP_ENA 0x10