aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 18:15:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 18:15:24 -0400
commit151173e8ce9b95bbbbd7eedb9035cfaffbdb7cb2 (patch)
treebca02f40bdd054fa2e30f4923e1513d40873c4d9 /include/linux/mfd
parent30945669593df14692e933c557d00c4bb2727857 (diff)
parent6b170807cd5cac8dc6353f47a88ccb14bbf76c4f (diff)
Merge tag 'for-v3.10' of git://git.infradead.org/battery-2.6
Pull battery updates from Anton Vorontsov: "Highlights: - OpenFirmware/DeviceTree support for the Power Supply core: the core now automatically populates supplied_from hierarchy from the device tree. With these patches chargers and batteries can now lookup each other without the board files support shim. Rhyland Klein at NVIDIA did the work - New ST-Ericsson ABX500 hwmon driver. The driver is heavily using the AB85xx core and depends on some recent changes to it, so that is why the driver comes through the battery tree. It has an appropriate ack from the hwmon maintainer (i.e. Guenter Roeck). Martin Persson at ST-Ericsson and Hongbo Zhang at Linaro authored the driver - Final bits to sync AB85xx ST-Ericsson changes into mainline. The changes touch mfd parts, but these were acked by the appropriate MFD maintainer (ie Samuel Ortiz). Lee Jones at Linaro did most of the work and lead the submission process. Minor changes, but still worth mentioning: - Battery temperature reporting fix for Nokia N900 phones - Versatile Express poweroff driver moved into drivers/power/reset/ - Tree-wide: use devm_kzalloc() where appropriate - Tree-wide: dev_pm_ops cleanups/fixes" * tag 'for-v3.10' of git://git.infradead.org/battery-2.6: (112 commits) pm2301-charger: Fix suspend/resume charger-manager: Use kmemdup instead of kzalloc + memcpy power_supply: Populate supplied_from hierarchy from the device tree power_supply: Add core support for supplied_from power_supply: Define Binding for power-supplies rx51_battery: Fix reporting temperature hwmon: Add ST-Ericsson ABX500 hwmon driver ab8500_bmdata: Export abx500_res_to_temp tables for hwmon ab8500_{bmdata,fg}: Add const attributes to some data arrays ab8500_bmdata: Eliminate CamelCase warning of some variables ab8500_btemp: Make ab8500_btemp_get* interfaces public goldfish_battery: Use resource_size() lp8788-charger: Use PAGE_SIZE for the sysfs read operation max8925_power: Use devm_kzalloc() da9030_battery: Use devm_kzalloc() da9052-battery: Use devm_kzalloc() ds2760_battery: Use devm_kzalloc() ds2780_battery: Use devm_kzalloc() gpio-charger: Use devm_kzalloc() isp1704_charger: Use devm_kzalloc() ...
Diffstat (limited to 'include/linux/mfd')
-rw-r--r--include/linux/mfd/abx500.h27
-rw-r--r--include/linux/mfd/abx500/ab8500-bm.h61
-rw-r--r--include/linux/mfd/abx500/ab8500-gpadc.h74
-rw-r--r--include/linux/mfd/abx500/ab8500-sysctrl.h6
-rw-r--r--include/linux/mfd/abx500/ab8500.h3
-rw-r--r--include/linux/mfd/abx500/ux500_chargalg.h7
-rw-r--r--include/linux/mfd/tps65090.h5
7 files changed, 157 insertions, 26 deletions
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h
index 9ead60bc66b7..3301b2031c8d 100644
--- a/include/linux/mfd/abx500.h
+++ b/include/linux/mfd/abx500.h
@@ -89,6 +89,11 @@ struct abx500_fg;
89 * points. 89 * points.
90 * @maint_thres This is the threshold where we stop reporting 90 * @maint_thres This is the threshold where we stop reporting
91 * battery full while in maintenance, in per cent 91 * battery full while in maintenance, in per cent
92 * @pcut_enable: Enable power cut feature in ab8505
93 * @pcut_max_time: Max time threshold
94 * @pcut_flag_time: Flagtime threshold
95 * @pcut_max_restart: Max number of restarts
96 * @pcut_debounce_time: Sets battery debounce time
92 */ 97 */
93struct abx500_fg_parameters { 98struct abx500_fg_parameters {
94 int recovery_sleep_timer; 99 int recovery_sleep_timer;
@@ -106,6 +111,11 @@ struct abx500_fg_parameters {
106 int battok_raising_th_sel1; 111 int battok_raising_th_sel1;
107 int user_cap_limit; 112 int user_cap_limit;
108 int maint_thres; 113 int maint_thres;
114 bool pcut_enable;
115 u8 pcut_max_time;
116 u8 pcut_flag_time;
117 u8 pcut_max_restart;
118 u8 pcut_debounce_time;
109}; 119};
110 120
111/** 121/**
@@ -173,11 +183,11 @@ struct abx500_battery_type {
173 int low_high_vol_lvl; 183 int low_high_vol_lvl;
174 int battery_resistance; 184 int battery_resistance;
175 int n_temp_tbl_elements; 185 int n_temp_tbl_elements;
176 struct abx500_res_to_temp *r_to_t_tbl; 186 const struct abx500_res_to_temp *r_to_t_tbl;
177 int n_v_cap_tbl_elements; 187 int n_v_cap_tbl_elements;
178 struct abx500_v_to_cap *v_to_cap_tbl; 188 const struct abx500_v_to_cap *v_to_cap_tbl;
179 int n_batres_tbl_elements; 189 int n_batres_tbl_elements;
180 struct batres_vs_temp *batres_tbl; 190 const struct batres_vs_temp *batres_tbl;
181}; 191};
182 192
183/** 193/**
@@ -236,7 +246,11 @@ struct abx500_bm_charger_parameters {
236 * @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)
237 * @temp_hysteresis temperature hysteresis 247 * @temp_hysteresis temperature hysteresis
238 * @gnd_lift_resistance Battery ground to phone ground resistance (mOhm) 248 * @gnd_lift_resistance Battery ground to phone ground resistance (mOhm)
239 * @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
240 * @cap_levels capacity in percent for the different capacity levels 254 * @cap_levels capacity in percent for the different capacity levels
241 * @bat_type table of supported battery types 255 * @bat_type table of supported battery types
242 * @chg_params charger parameters 256 * @chg_params charger parameters
@@ -257,6 +271,7 @@ struct abx500_bm_data {
257 bool autopower_cfg; 271 bool autopower_cfg;
258 bool ac_enabled; 272 bool ac_enabled;
259 bool usb_enabled; 273 bool usb_enabled;
274 bool usb_power_path;
260 bool no_maintenance; 275 bool no_maintenance;
261 bool capacity_scaling; 276 bool capacity_scaling;
262 bool chg_unknown_bat; 277 bool chg_unknown_bat;
@@ -270,6 +285,10 @@ struct abx500_bm_data {
270 int interval_not_charging; 285 int interval_not_charging;
271 int temp_hysteresis; 286 int temp_hysteresis;
272 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;
273 const struct abx500_maxim_parameters *maxi; 292 const struct abx500_maxim_parameters *maxi;
274 const struct abx500_bm_capacity_levels *cap_levels; 293 const struct abx500_bm_capacity_levels *cap_levels;
275 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 8d35bfe164c8..cc892a8d8d6e 100644
--- a/include/linux/mfd/abx500/ab8500-bm.h
+++ b/include/linux/mfd/abx500/ab8500-bm.h
@@ -23,6 +23,7 @@
23 * Bank : 0x5 23 * Bank : 0x5
24 */ 24 */
25#define AB8500_USB_LINE_STAT_REG 0x80 25#define AB8500_USB_LINE_STAT_REG 0x80
26#define AB8500_USB_LINE_CTRL2_REG 0x82
26#define AB8500_USB_LINK1_STAT_REG 0x94 27#define AB8500_USB_LINK1_STAT_REG 0x94
27 28
28/* 29/*
@@ -33,7 +34,7 @@
33#define AB8500_CH_STATUS2_REG 0x01 34#define AB8500_CH_STATUS2_REG 0x01
34#define AB8500_CH_USBCH_STAT1_REG 0x02 35#define AB8500_CH_USBCH_STAT1_REG 0x02
35#define AB8500_CH_USBCH_STAT2_REG 0x03 36#define AB8500_CH_USBCH_STAT2_REG 0x03
36#define AB8500_CH_FSM_STAT_REG 0x04 37#define AB8540_CH_USBCH_STAT3_REG 0x04
37#define AB8500_CH_STAT_REG 0x05 38#define AB8500_CH_STAT_REG 0x05
38 39
39/* 40/*
@@ -69,6 +70,8 @@
69#define AB8500_USBCH_CTRL1_REG 0xC0 70#define AB8500_USBCH_CTRL1_REG 0xC0
70#define AB8500_USBCH_CTRL2_REG 0xC1 71#define AB8500_USBCH_CTRL2_REG 0xC1
71#define AB8500_USBCH_IPT_CRNTLVL_REG 0xC2 72#define AB8500_USBCH_IPT_CRNTLVL_REG 0xC2
73#define AB8540_USB_PP_MODE_REG 0xC5
74#define AB8540_USB_PP_CHR_REG 0xC6
72 75
73/* 76/*
74 * Gas Gauge register offsets 77 * Gas Gauge register offsets
@@ -105,6 +108,7 @@
105#define AB8500_RTC_BACKUP_CHG_REG 0x0C 108#define AB8500_RTC_BACKUP_CHG_REG 0x0C
106#define AB8500_RTC_CC_CONF_REG 0x01 109#define AB8500_RTC_CC_CONF_REG 0x01
107#define AB8500_RTC_CTRL_REG 0x0B 110#define AB8500_RTC_CTRL_REG 0x0B
111#define AB8500_RTC_CTRL1_REG 0x11
108 112
109/* 113/*
110 * OTP register offsets 114 * OTP register offsets
@@ -154,6 +158,7 @@
154#define CH_OP_CUR_LVL_1P4 0x0D 158#define CH_OP_CUR_LVL_1P4 0x0D
155#define CH_OP_CUR_LVL_1P5 0x0E 159#define CH_OP_CUR_LVL_1P5 0x0E
156#define CH_OP_CUR_LVL_1P6 0x0F 160#define CH_OP_CUR_LVL_1P6 0x0F
161#define CH_OP_CUR_LVL_2P 0x3F
157 162
158/* BTEMP High thermal limits */ 163/* BTEMP High thermal limits */
159#define BTEMP_HIGH_TH_57_0 0x00 164#define BTEMP_HIGH_TH_57_0 0x00
@@ -179,10 +184,25 @@
179#define BUP_ICH_SEL_300UA 0x08 184#define BUP_ICH_SEL_300UA 0x08
180#define BUP_ICH_SEL_700UA 0x0C 185#define BUP_ICH_SEL_700UA 0x0C
181 186
182#define BUP_VCH_SEL_2P5V 0x00 187enum bup_vch_sel {
183#define BUP_VCH_SEL_2P6V 0x01 188 BUP_VCH_SEL_2P5V,
184#define BUP_VCH_SEL_2P8V 0x02 189 BUP_VCH_SEL_2P6V,
185#define BUP_VCH_SEL_3P1V 0x03 190 BUP_VCH_SEL_2P8V,
191 BUP_VCH_SEL_3P1V,
192 /*
193 * Note that the following 5 values 2.7v, 2.9v, 3.0v, 3.2v, 3.3v
194 * are only available on ab8540. You can't choose these 5
195 * voltage on ab8500/ab8505/ab9540.
196 */
197 BUP_VCH_SEL_2P7V,
198 BUP_VCH_SEL_2P9V,
199 BUP_VCH_SEL_3P0V,
200 BUP_VCH_SEL_3P2V,
201 BUP_VCH_SEL_3P3V,
202};
203
204#define BUP_VCH_RANGE 0x02
205#define VBUP33_VRTCN 0x01
186 206
187/* Battery OVV constants */ 207/* Battery OVV constants */
188#define BATT_OVV_ENA 0x02 208#define BATT_OVV_ENA 0x02
@@ -228,6 +248,8 @@
228#define BAT_CTRL_20U_ENA 0x02 248#define BAT_CTRL_20U_ENA 0x02
229#define BAT_CTRL_18U_ENA 0x01 249#define BAT_CTRL_18U_ENA 0x01
230#define BAT_CTRL_16U_ENA 0x02 250#define BAT_CTRL_16U_ENA 0x02
251#define BAT_CTRL_60U_ENA 0x01
252#define BAT_CTRL_120U_ENA 0x02
231#define BAT_CTRL_CMP_ENA 0x04 253#define BAT_CTRL_CMP_ENA 0x04
232#define FORCE_BAT_CTRL_CMP_HIGH 0x08 254#define FORCE_BAT_CTRL_CMP_HIGH 0x08
233#define BAT_CTRL_PULL_UP_ENA 0x10 255#define BAT_CTRL_PULL_UP_ENA 0x10
@@ -235,6 +257,24 @@
235/* Battery type */ 257/* Battery type */
236#define BATTERY_UNKNOWN 00 258#define BATTERY_UNKNOWN 00
237 259
260/* Registers for pcut feature in ab8505 and ab9540 */
261#define AB8505_RTC_PCUT_CTL_STATUS_REG 0x12
262#define AB8505_RTC_PCUT_TIME_REG 0x13
263#define AB8505_RTC_PCUT_MAX_TIME_REG 0x14
264#define AB8505_RTC_PCUT_FLAG_TIME_REG 0x15
265#define AB8505_RTC_PCUT_RESTART_REG 0x16
266#define AB8505_RTC_PCUT_DEBOUNCE_REG 0x17
267
268/* USB Power Path constants for ab8540 */
269#define BUS_VSYS_VOL_SELECT_MASK 0x06
270#define BUS_VSYS_VOL_SELECT_3P6V 0x00
271#define BUS_VSYS_VOL_SELECT_3P325V 0x02
272#define BUS_VSYS_VOL_SELECT_3P9V 0x04
273#define BUS_VSYS_VOL_SELECT_4P3V 0x06
274#define BUS_POWER_PATH_MODE_ENA 0x01
275#define BUS_PP_PRECHG_CURRENT_MASK 0x0E
276#define BUS_POWER_PATH_PRECHG_ENA 0x01
277
238/** 278/**
239 * struct res_to_temp - defines one point in a temp to res curve. To 279 * struct res_to_temp - defines one point in a temp to res curve. To
240 * be used in battery packs that combines the identification resistor with a 280 * be used in battery packs that combines the identification resistor with a
@@ -283,6 +323,11 @@ struct ab8500_fg;
283 * points. 323 * points.
284 * @maint_thres This is the threshold where we stop reporting 324 * @maint_thres This is the threshold where we stop reporting
285 * battery full while in maintenance, in per cent 325 * battery full while in maintenance, in per cent
326 * @pcut_enable: Enable power cut feature in ab8505
327 * @pcut_max_time: Max time threshold
328 * @pcut_flag_time: Flagtime threshold
329 * @pcut_max_restart: Max number of restarts
330 * @pcut_debunce_time: Sets battery debounce time
286 */ 331 */
287struct ab8500_fg_parameters { 332struct ab8500_fg_parameters {
288 int recovery_sleep_timer; 333 int recovery_sleep_timer;
@@ -299,6 +344,11 @@ struct ab8500_fg_parameters {
299 int battok_raising_th_sel1; 344 int battok_raising_th_sel1;
300 int user_cap_limit; 345 int user_cap_limit;
301 int maint_thres; 346 int maint_thres;
347 bool pcut_enable;
348 u8 pcut_max_time;
349 u8 pcut_flag_time;
350 u8 pcut_max_restart;
351 u8 pcut_debunce_time;
302}; 352};
303 353
304/** 354/**
@@ -415,6 +465,7 @@ void ab8500_fg_reinit(void);
415void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); 465void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA);
416struct ab8500_btemp *ab8500_btemp_get(void); 466struct ab8500_btemp *ab8500_btemp_get(void);
417int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp); 467int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp);
468int ab8500_btemp_get_temp(struct ab8500_btemp *btemp);
418struct ab8500_fg *ab8500_fg_get(void); 469struct ab8500_fg *ab8500_fg_get(void);
419int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev); 470int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev);
420int ab8500_fg_inst_curr_start(struct ab8500_fg *di); 471int ab8500_fg_inst_curr_start(struct ab8500_fg *di);
diff --git a/include/linux/mfd/abx500/ab8500-gpadc.h b/include/linux/mfd/abx500/ab8500-gpadc.h
index 252966769d93..49ded001049b 100644
--- a/include/linux/mfd/abx500/ab8500-gpadc.h
+++ b/include/linux/mfd/abx500/ab8500-gpadc.h
@@ -4,32 +4,72 @@
4 * 4 *
5 * Author: Arun R Murthy <arun.murthy@stericsson.com> 5 * Author: Arun R Murthy <arun.murthy@stericsson.com>
6 * Author: Daniel Willerud <daniel.willerud@stericsson.com> 6 * Author: Daniel Willerud <daniel.willerud@stericsson.com>
7 * Author: M'boumba Cedric Madianga <cedric.madianga@stericsson.com>
7 */ 8 */
8 9
9#ifndef _AB8500_GPADC_H 10#ifndef _AB8500_GPADC_H
10#define _AB8500_GPADC_H 11#define _AB8500_GPADC_H
11 12
12/* GPADC source: From datasheet(ADCSwSel[4:0] in GPADCCtrl2) */ 13/* GPADC source: From datasheet(ADCSwSel[4:0] in GPADCCtrl2
13#define BAT_CTRL 0x01 14 * and ADCHwSel[4:0] in GPADCCtrl3 ) */
14#define BTEMP_BALL 0x02 15#define BAT_CTRL 0x01
15#define MAIN_CHARGER_V 0x03 16#define BTEMP_BALL 0x02
16#define ACC_DETECT1 0x04 17#define MAIN_CHARGER_V 0x03
17#define ACC_DETECT2 0x05 18#define ACC_DETECT1 0x04
18#define ADC_AUX1 0x06 19#define ACC_DETECT2 0x05
19#define ADC_AUX2 0x07 20#define ADC_AUX1 0x06
20#define MAIN_BAT_V 0x08 21#define ADC_AUX2 0x07
21#define VBUS_V 0x09 22#define MAIN_BAT_V 0x08
22#define MAIN_CHARGER_C 0x0A 23#define VBUS_V 0x09
23#define USB_CHARGER_C 0x0B 24#define MAIN_CHARGER_C 0x0A
24#define BK_BAT_V 0x0C 25#define USB_CHARGER_C 0x0B
25#define DIE_TEMP 0x0D 26#define BK_BAT_V 0x0C
27#define DIE_TEMP 0x0D
28#define USB_ID 0x0E
29#define XTAL_TEMP 0x12
30#define VBAT_TRUE_MEAS 0x13
31#define BAT_CTRL_AND_IBAT 0x1C
32#define VBAT_MEAS_AND_IBAT 0x1D
33#define VBAT_TRUE_MEAS_AND_IBAT 0x1E
34#define BAT_TEMP_AND_IBAT 0x1F
35
36/* Virtual channel used only for ibat convertion to ampere
37 * Battery current conversion (ibat) cannot be requested as a single conversion
38 * but it is always in combination with other input requests
39 */
40#define IBAT_VIRTUAL_CHANNEL 0xFF
41
42#define SAMPLE_1 1
43#define SAMPLE_4 4
44#define SAMPLE_8 8
45#define SAMPLE_16 16
46#define RISING_EDGE 0
47#define FALLING_EDGE 1
48
49/* Arbitrary ADC conversion type constants */
50#define ADC_SW 0
51#define ADC_HW 1
26 52
27struct ab8500_gpadc; 53struct ab8500_gpadc;
28 54
29struct ab8500_gpadc *ab8500_gpadc_get(char *name); 55struct ab8500_gpadc *ab8500_gpadc_get(char *name);
30int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel); 56int ab8500_gpadc_sw_hw_convert(struct ab8500_gpadc *gpadc, u8 channel,
31int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel); 57 u8 avg_sample, u8 trig_edge, u8 trig_timer, u8 conv_type);
58static inline int ab8500_gpadc_convert(struct ab8500_gpadc *gpadc, u8 channel)
59{
60 return ab8500_gpadc_sw_hw_convert(gpadc, channel,
61 SAMPLE_16, 0, 0, ADC_SW);
62}
63
64int ab8500_gpadc_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
65 u8 avg_sample, u8 trig_edge, u8 trig_timer, u8 conv_type);
66int ab8500_gpadc_double_read_raw(struct ab8500_gpadc *gpadc, u8 channel,
67 u8 avg_sample, u8 trig_edge, u8 trig_timer, u8 conv_type,
68 int *ibat);
32int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc, 69int ab8500_gpadc_ad_to_voltage(struct ab8500_gpadc *gpadc,
33 u8 channel, int ad_value); 70 u8 channel, int ad_value);
71void ab8540_gpadc_get_otp(struct ab8500_gpadc *gpadc,
72 u16 *vmain_l, u16 *vmain_h, u16 *btemp_l, u16 *btemp_h,
73 u16 *vbat_l, u16 *vbat_h, u16 *ibat_l, u16 *ibat_h);
34 74
35#endif /* _AB8500_GPADC_H */ 75#endif /* _AB8500_GPADC_H */
diff --git a/include/linux/mfd/abx500/ab8500-sysctrl.h b/include/linux/mfd/abx500/ab8500-sysctrl.h
index ebf12e793db9..990bc93f46e1 100644
--- a/include/linux/mfd/abx500/ab8500-sysctrl.h
+++ b/include/linux/mfd/abx500/ab8500-sysctrl.h
@@ -12,6 +12,7 @@
12 12
13int ab8500_sysctrl_read(u16 reg, u8 *value); 13int ab8500_sysctrl_read(u16 reg, u8 *value);
14int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value); 14int ab8500_sysctrl_write(u16 reg, u8 mask, u8 value);
15void ab8500_restart(char mode, const char *cmd);
15 16
16#else 17#else
17 18
@@ -40,6 +41,7 @@ static inline int ab8500_sysctrl_clear(u16 reg, u8 bits)
40/* Configuration data for SysClkReq1RfClkBuf - SysClkReq8RfClkBuf */ 41/* Configuration data for SysClkReq1RfClkBuf - SysClkReq8RfClkBuf */
41struct ab8500_sysctrl_platform_data { 42struct ab8500_sysctrl_platform_data {
42 u8 initial_req_buf_config[8]; 43 u8 initial_req_buf_config[8];
44 u16 (*reboot_reason_code)(const char *cmd);
43}; 45};
44 46
45/* Registers */ 47/* Registers */
@@ -299,4 +301,8 @@ struct ab8500_sysctrl_platform_data {
299#define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_MASK 0xFF 301#define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_MASK 0xFF
300#define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_SHIFT 0 302#define AB9540_SYSCLK12BUF4VALID_SYSCLK12BUF4VALID_SHIFT 0
301 303
304#define AB8500_ENABLE_WD 0x1
305#define AB8500_KICK_WD 0x2
306#define AB8500_WD_RESTART_ON_EXPIRE 0x10
307
302#endif /* __AB8500_SYSCTRL_H */ 308#endif /* __AB8500_SYSCTRL_H */
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 84f449475c25..fb1bf7d6a410 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -362,6 +362,7 @@ struct ab8500 {
362 u8 *oldmask; 362 u8 *oldmask;
363 int mask_size; 363 int mask_size;
364 const int *irq_reg_offset; 364 const int *irq_reg_offset;
365 int it_latchhier_num;
365}; 366};
366 367
367struct ab8500_regulator_platform_data; 368struct ab8500_regulator_platform_data;
@@ -505,6 +506,8 @@ static inline int is_ab9540_2p0_or_earlier(struct ab8500 *ab)
505 return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0)); 506 return (is_ab9540(ab) && (ab->chip_id < AB8500_CUT2P0));
506} 507}
507 508
509void ab8500_override_turn_on_stat(u8 mask, u8 set);
510
508#ifdef CONFIG_AB8500_DEBUG 511#ifdef CONFIG_AB8500_DEBUG
509void ab8500_dump_all_banks(struct device *dev); 512void ab8500_dump_all_banks(struct device *dev);
510void ab8500_debug_register_interrupt(int line); 513void ab8500_debug_register_interrupt(int line);
diff --git a/include/linux/mfd/abx500/ux500_chargalg.h b/include/linux/mfd/abx500/ux500_chargalg.h
index d43ac0f35526..234c99143bf7 100644
--- a/include/linux/mfd/abx500/ux500_chargalg.h
+++ b/include/linux/mfd/abx500/ux500_chargalg.h
@@ -17,8 +17,11 @@ struct ux500_charger;
17 17
18struct ux500_charger_ops { 18struct ux500_charger_ops {
19 int (*enable) (struct ux500_charger *, int, int, int); 19 int (*enable) (struct ux500_charger *, int, int, int);
20 int (*check_enable) (struct ux500_charger *, int, int);
20 int (*kick_wd) (struct ux500_charger *); 21 int (*kick_wd) (struct ux500_charger *);
21 int (*update_curr) (struct ux500_charger *, int); 22 int (*update_curr) (struct ux500_charger *, int);
23 int (*pp_enable) (struct ux500_charger *, bool);
24 int (*pre_chg_enable) (struct ux500_charger *, bool);
22}; 25};
23 26
24/** 27/**
@@ -29,6 +32,7 @@ struct ux500_charger_ops {
29 * @max_out_curr maximum output charger current in mA 32 * @max_out_curr maximum output charger current in mA
30 * @enabled indicates if this charger is used or not 33 * @enabled indicates if this charger is used or not
31 * @external external charger unit (pm2xxx) 34 * @external external charger unit (pm2xxx)
35 * @power_path USB power path support
32 */ 36 */
33struct ux500_charger { 37struct ux500_charger {
34 struct power_supply psy; 38 struct power_supply psy;
@@ -38,6 +42,9 @@ struct ux500_charger {
38 int wdt_refresh; 42 int wdt_refresh;
39 bool enabled; 43 bool enabled;
40 bool external; 44 bool external;
45 bool power_path;
41}; 46};
42 47
48extern struct blocking_notifier_head charger_notifier_list;
49
43#endif 50#endif
diff --git a/include/linux/mfd/tps65090.h b/include/linux/mfd/tps65090.h
index 6694cf43e8b8..998628a2b08b 100644
--- a/include/linux/mfd/tps65090.h
+++ b/include/linux/mfd/tps65090.h
@@ -86,6 +86,11 @@ struct tps65090_regulator_plat_data {
86 86
87struct tps65090_platform_data { 87struct tps65090_platform_data {
88 int irq_base; 88 int irq_base;
89
90 char **supplied_to;
91 size_t num_supplicants;
92 int enable_low_current_chrg;
93
89 struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX]; 94 struct tps65090_regulator_plat_data *reg_pdata[TPS65090_REGULATOR_MAX];
90}; 95};
91 96