aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:11:08 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 13:11:08 -0400
commit433c24ed7ff378b22c4d6531a4ce1ffc62642395 (patch)
treed71181129b05d923100d160ca000f6771fc0ac85 /include
parent85afd82780df133f03185aec7943ee3e0ed56a7b (diff)
parentf056878332a91ed984a116bad4e7d49aefff9e6e (diff)
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6: power_supply: Add driver for the PMU on WM831x PMICs ds2760_battery: Fix integer overflow for time_to_empty_now wm97xx_battery: Convert to dev_pm_ops wm97xx_battery: Use irq to detect charger state wm97xx_battery: Use platform_data wm97xx-core: Pass platform_data to battery ds2760_battery: implement set_charged() feature power_supply: get_by_name and set_charged functionality power_supply: EXPORT_SYMBOL cleanups ds2760_battery: add current_accum module parameter ds2760_battery: handle full_active_uAh == 0 case correctly ds2760_battery: add rated_capacity module parameter ds2760_battery: export more features ds2760_battery: delay power supply registration wm8350_power: Implement charge type property power_supply: Add a charge_type property, and use it for olpc driver olpc_battery: Add an 'error' sysfs device that displays raw errors Revert "power: remove POWER_SUPPLY_PROP_CAPACITY_LEVEL"
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/wm831x/pmu.h189
-rw-r--r--include/linux/power_supply.h21
-rw-r--r--include/linux/wm97xx.h18
-rw-r--r--include/linux/wm97xx_batt.h18
4 files changed, 232 insertions, 14 deletions
diff --git a/include/linux/mfd/wm831x/pmu.h b/include/linux/mfd/wm831x/pmu.h
new file mode 100644
index 000000000000..b18cbb027bc3
--- /dev/null
+++ b/include/linux/mfd/wm831x/pmu.h
@@ -0,0 +1,189 @@
1/*
2 * include/linux/mfd/wm831x/pmu.h -- PMU for WM831x
3 *
4 * Copyright 2009 Wolfson Microelectronics PLC.
5 *
6 * Author: Mark Brown <broonie@opensource.wolfsonmicro.com>
7 *
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version.
12 *
13 */
14
15#ifndef __MFD_WM831X_PMU_H__
16#define __MFD_WM831X_PMU_H__
17
18/*
19 * R16387 (0x4003) - Power State
20 */
21#define WM831X_CHIP_ON 0x8000 /* CHIP_ON */
22#define WM831X_CHIP_ON_MASK 0x8000 /* CHIP_ON */
23#define WM831X_CHIP_ON_SHIFT 15 /* CHIP_ON */
24#define WM831X_CHIP_ON_WIDTH 1 /* CHIP_ON */
25#define WM831X_CHIP_SLP 0x4000 /* CHIP_SLP */
26#define WM831X_CHIP_SLP_MASK 0x4000 /* CHIP_SLP */
27#define WM831X_CHIP_SLP_SHIFT 14 /* CHIP_SLP */
28#define WM831X_CHIP_SLP_WIDTH 1 /* CHIP_SLP */
29#define WM831X_REF_LP 0x1000 /* REF_LP */
30#define WM831X_REF_LP_MASK 0x1000 /* REF_LP */
31#define WM831X_REF_LP_SHIFT 12 /* REF_LP */
32#define WM831X_REF_LP_WIDTH 1 /* REF_LP */
33#define WM831X_PWRSTATE_DLY_MASK 0x0C00 /* PWRSTATE_DLY - [11:10] */
34#define WM831X_PWRSTATE_DLY_SHIFT 10 /* PWRSTATE_DLY - [11:10] */
35#define WM831X_PWRSTATE_DLY_WIDTH 2 /* PWRSTATE_DLY - [11:10] */
36#define WM831X_SWRST_DLY 0x0200 /* SWRST_DLY */
37#define WM831X_SWRST_DLY_MASK 0x0200 /* SWRST_DLY */
38#define WM831X_SWRST_DLY_SHIFT 9 /* SWRST_DLY */
39#define WM831X_SWRST_DLY_WIDTH 1 /* SWRST_DLY */
40#define WM831X_USB100MA_STARTUP_MASK 0x0030 /* USB100MA_STARTUP - [5:4] */
41#define WM831X_USB100MA_STARTUP_SHIFT 4 /* USB100MA_STARTUP - [5:4] */
42#define WM831X_USB100MA_STARTUP_WIDTH 2 /* USB100MA_STARTUP - [5:4] */
43#define WM831X_USB_CURR_STS 0x0008 /* USB_CURR_STS */
44#define WM831X_USB_CURR_STS_MASK 0x0008 /* USB_CURR_STS */
45#define WM831X_USB_CURR_STS_SHIFT 3 /* USB_CURR_STS */
46#define WM831X_USB_CURR_STS_WIDTH 1 /* USB_CURR_STS */
47#define WM831X_USB_ILIM_MASK 0x0007 /* USB_ILIM - [2:0] */
48#define WM831X_USB_ILIM_SHIFT 0 /* USB_ILIM - [2:0] */
49#define WM831X_USB_ILIM_WIDTH 3 /* USB_ILIM - [2:0] */
50
51/*
52 * R16397 (0x400D) - System Status
53 */
54#define WM831X_THW_STS 0x8000 /* THW_STS */
55#define WM831X_THW_STS_MASK 0x8000 /* THW_STS */
56#define WM831X_THW_STS_SHIFT 15 /* THW_STS */
57#define WM831X_THW_STS_WIDTH 1 /* THW_STS */
58#define WM831X_PWR_SRC_BATT 0x0400 /* PWR_SRC_BATT */
59#define WM831X_PWR_SRC_BATT_MASK 0x0400 /* PWR_SRC_BATT */
60#define WM831X_PWR_SRC_BATT_SHIFT 10 /* PWR_SRC_BATT */
61#define WM831X_PWR_SRC_BATT_WIDTH 1 /* PWR_SRC_BATT */
62#define WM831X_PWR_WALL 0x0200 /* PWR_WALL */
63#define WM831X_PWR_WALL_MASK 0x0200 /* PWR_WALL */
64#define WM831X_PWR_WALL_SHIFT 9 /* PWR_WALL */
65#define WM831X_PWR_WALL_WIDTH 1 /* PWR_WALL */
66#define WM831X_PWR_USB 0x0100 /* PWR_USB */
67#define WM831X_PWR_USB_MASK 0x0100 /* PWR_USB */
68#define WM831X_PWR_USB_SHIFT 8 /* PWR_USB */
69#define WM831X_PWR_USB_WIDTH 1 /* PWR_USB */
70#define WM831X_MAIN_STATE_MASK 0x001F /* MAIN_STATE - [4:0] */
71#define WM831X_MAIN_STATE_SHIFT 0 /* MAIN_STATE - [4:0] */
72#define WM831X_MAIN_STATE_WIDTH 5 /* MAIN_STATE - [4:0] */
73
74/*
75 * R16456 (0x4048) - Charger Control 1
76 */
77#define WM831X_CHG_ENA 0x8000 /* CHG_ENA */
78#define WM831X_CHG_ENA_MASK 0x8000 /* CHG_ENA */
79#define WM831X_CHG_ENA_SHIFT 15 /* CHG_ENA */
80#define WM831X_CHG_ENA_WIDTH 1 /* CHG_ENA */
81#define WM831X_CHG_FRC 0x4000 /* CHG_FRC */
82#define WM831X_CHG_FRC_MASK 0x4000 /* CHG_FRC */
83#define WM831X_CHG_FRC_SHIFT 14 /* CHG_FRC */
84#define WM831X_CHG_FRC_WIDTH 1 /* CHG_FRC */
85#define WM831X_CHG_ITERM_MASK 0x1C00 /* CHG_ITERM - [12:10] */
86#define WM831X_CHG_ITERM_SHIFT 10 /* CHG_ITERM - [12:10] */
87#define WM831X_CHG_ITERM_WIDTH 3 /* CHG_ITERM - [12:10] */
88#define WM831X_CHG_FAST 0x0020 /* CHG_FAST */
89#define WM831X_CHG_FAST_MASK 0x0020 /* CHG_FAST */
90#define WM831X_CHG_FAST_SHIFT 5 /* CHG_FAST */
91#define WM831X_CHG_FAST_WIDTH 1 /* CHG_FAST */
92#define WM831X_CHG_IMON_ENA 0x0002 /* CHG_IMON_ENA */
93#define WM831X_CHG_IMON_ENA_MASK 0x0002 /* CHG_IMON_ENA */
94#define WM831X_CHG_IMON_ENA_SHIFT 1 /* CHG_IMON_ENA */
95#define WM831X_CHG_IMON_ENA_WIDTH 1 /* CHG_IMON_ENA */
96#define WM831X_CHG_CHIP_TEMP_MON 0x0001 /* CHG_CHIP_TEMP_MON */
97#define WM831X_CHG_CHIP_TEMP_MON_MASK 0x0001 /* CHG_CHIP_TEMP_MON */
98#define WM831X_CHG_CHIP_TEMP_MON_SHIFT 0 /* CHG_CHIP_TEMP_MON */
99#define WM831X_CHG_CHIP_TEMP_MON_WIDTH 1 /* CHG_CHIP_TEMP_MON */
100
101/*
102 * R16457 (0x4049) - Charger Control 2
103 */
104#define WM831X_CHG_OFF_MSK 0x4000 /* CHG_OFF_MSK */
105#define WM831X_CHG_OFF_MSK_MASK 0x4000 /* CHG_OFF_MSK */
106#define WM831X_CHG_OFF_MSK_SHIFT 14 /* CHG_OFF_MSK */
107#define WM831X_CHG_OFF_MSK_WIDTH 1 /* CHG_OFF_MSK */
108#define WM831X_CHG_TIME_MASK 0x0F00 /* CHG_TIME - [11:8] */
109#define WM831X_CHG_TIME_SHIFT 8 /* CHG_TIME - [11:8] */
110#define WM831X_CHG_TIME_WIDTH 4 /* CHG_TIME - [11:8] */
111#define WM831X_CHG_TRKL_ILIM_MASK 0x00C0 /* CHG_TRKL_ILIM - [7:6] */
112#define WM831X_CHG_TRKL_ILIM_SHIFT 6 /* CHG_TRKL_ILIM - [7:6] */
113#define WM831X_CHG_TRKL_ILIM_WIDTH 2 /* CHG_TRKL_ILIM - [7:6] */
114#define WM831X_CHG_VSEL_MASK 0x0030 /* CHG_VSEL - [5:4] */
115#define WM831X_CHG_VSEL_SHIFT 4 /* CHG_VSEL - [5:4] */
116#define WM831X_CHG_VSEL_WIDTH 2 /* CHG_VSEL - [5:4] */
117#define WM831X_CHG_FAST_ILIM_MASK 0x000F /* CHG_FAST_ILIM - [3:0] */
118#define WM831X_CHG_FAST_ILIM_SHIFT 0 /* CHG_FAST_ILIM - [3:0] */
119#define WM831X_CHG_FAST_ILIM_WIDTH 4 /* CHG_FAST_ILIM - [3:0] */
120
121/*
122 * R16458 (0x404A) - Charger Status
123 */
124#define WM831X_BATT_OV_STS 0x8000 /* BATT_OV_STS */
125#define WM831X_BATT_OV_STS_MASK 0x8000 /* BATT_OV_STS */
126#define WM831X_BATT_OV_STS_SHIFT 15 /* BATT_OV_STS */
127#define WM831X_BATT_OV_STS_WIDTH 1 /* BATT_OV_STS */
128#define WM831X_CHG_STATE_MASK 0x7000 /* CHG_STATE - [14:12] */
129#define WM831X_CHG_STATE_SHIFT 12 /* CHG_STATE - [14:12] */
130#define WM831X_CHG_STATE_WIDTH 3 /* CHG_STATE - [14:12] */
131#define WM831X_BATT_HOT_STS 0x0800 /* BATT_HOT_STS */
132#define WM831X_BATT_HOT_STS_MASK 0x0800 /* BATT_HOT_STS */
133#define WM831X_BATT_HOT_STS_SHIFT 11 /* BATT_HOT_STS */
134#define WM831X_BATT_HOT_STS_WIDTH 1 /* BATT_HOT_STS */
135#define WM831X_BATT_COLD_STS 0x0400 /* BATT_COLD_STS */
136#define WM831X_BATT_COLD_STS_MASK 0x0400 /* BATT_COLD_STS */
137#define WM831X_BATT_COLD_STS_SHIFT 10 /* BATT_COLD_STS */
138#define WM831X_BATT_COLD_STS_WIDTH 1 /* BATT_COLD_STS */
139#define WM831X_CHG_TOPOFF 0x0200 /* CHG_TOPOFF */
140#define WM831X_CHG_TOPOFF_MASK 0x0200 /* CHG_TOPOFF */
141#define WM831X_CHG_TOPOFF_SHIFT 9 /* CHG_TOPOFF */
142#define WM831X_CHG_TOPOFF_WIDTH 1 /* CHG_TOPOFF */
143#define WM831X_CHG_ACTIVE 0x0100 /* CHG_ACTIVE */
144#define WM831X_CHG_ACTIVE_MASK 0x0100 /* CHG_ACTIVE */
145#define WM831X_CHG_ACTIVE_SHIFT 8 /* CHG_ACTIVE */
146#define WM831X_CHG_ACTIVE_WIDTH 1 /* CHG_ACTIVE */
147#define WM831X_CHG_TIME_ELAPSED_MASK 0x00FF /* CHG_TIME_ELAPSED - [7:0] */
148#define WM831X_CHG_TIME_ELAPSED_SHIFT 0 /* CHG_TIME_ELAPSED - [7:0] */
149#define WM831X_CHG_TIME_ELAPSED_WIDTH 8 /* CHG_TIME_ELAPSED - [7:0] */
150
151#define WM831X_CHG_STATE_OFF (0 << WM831X_CHG_STATE_SHIFT)
152#define WM831X_CHG_STATE_TRICKLE (1 << WM831X_CHG_STATE_SHIFT)
153#define WM831X_CHG_STATE_FAST (2 << WM831X_CHG_STATE_SHIFT)
154#define WM831X_CHG_STATE_TRICKLE_OT (3 << WM831X_CHG_STATE_SHIFT)
155#define WM831X_CHG_STATE_FAST_OT (4 << WM831X_CHG_STATE_SHIFT)
156#define WM831X_CHG_STATE_DEFECTIVE (5 << WM831X_CHG_STATE_SHIFT)
157
158/*
159 * R16459 (0x404B) - Backup Charger Control
160 */
161#define WM831X_BKUP_CHG_ENA 0x8000 /* BKUP_CHG_ENA */
162#define WM831X_BKUP_CHG_ENA_MASK 0x8000 /* BKUP_CHG_ENA */
163#define WM831X_BKUP_CHG_ENA_SHIFT 15 /* BKUP_CHG_ENA */
164#define WM831X_BKUP_CHG_ENA_WIDTH 1 /* BKUP_CHG_ENA */
165#define WM831X_BKUP_CHG_STS 0x4000 /* BKUP_CHG_STS */
166#define WM831X_BKUP_CHG_STS_MASK 0x4000 /* BKUP_CHG_STS */
167#define WM831X_BKUP_CHG_STS_SHIFT 14 /* BKUP_CHG_STS */
168#define WM831X_BKUP_CHG_STS_WIDTH 1 /* BKUP_CHG_STS */
169#define WM831X_BKUP_CHG_MODE 0x1000 /* BKUP_CHG_MODE */
170#define WM831X_BKUP_CHG_MODE_MASK 0x1000 /* BKUP_CHG_MODE */
171#define WM831X_BKUP_CHG_MODE_SHIFT 12 /* BKUP_CHG_MODE */
172#define WM831X_BKUP_CHG_MODE_WIDTH 1 /* BKUP_CHG_MODE */
173#define WM831X_BKUP_BATT_DET_ENA 0x0800 /* BKUP_BATT_DET_ENA */
174#define WM831X_BKUP_BATT_DET_ENA_MASK 0x0800 /* BKUP_BATT_DET_ENA */
175#define WM831X_BKUP_BATT_DET_ENA_SHIFT 11 /* BKUP_BATT_DET_ENA */
176#define WM831X_BKUP_BATT_DET_ENA_WIDTH 1 /* BKUP_BATT_DET_ENA */
177#define WM831X_BKUP_BATT_STS 0x0400 /* BKUP_BATT_STS */
178#define WM831X_BKUP_BATT_STS_MASK 0x0400 /* BKUP_BATT_STS */
179#define WM831X_BKUP_BATT_STS_SHIFT 10 /* BKUP_BATT_STS */
180#define WM831X_BKUP_BATT_STS_WIDTH 1 /* BKUP_BATT_STS */
181#define WM831X_BKUP_CHG_VLIM 0x0010 /* BKUP_CHG_VLIM */
182#define WM831X_BKUP_CHG_VLIM_MASK 0x0010 /* BKUP_CHG_VLIM */
183#define WM831X_BKUP_CHG_VLIM_SHIFT 4 /* BKUP_CHG_VLIM */
184#define WM831X_BKUP_CHG_VLIM_WIDTH 1 /* BKUP_CHG_VLIM */
185#define WM831X_BKUP_CHG_ILIM_MASK 0x0003 /* BKUP_CHG_ILIM - [1:0] */
186#define WM831X_BKUP_CHG_ILIM_SHIFT 0 /* BKUP_CHG_ILIM - [1:0] */
187#define WM831X_BKUP_CHG_ILIM_WIDTH 2 /* BKUP_CHG_ILIM - [1:0] */
188
189#endif
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 594c494ac3f0..b5d096d3a9be 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -39,6 +39,13 @@ enum {
39}; 39};
40 40
41enum { 41enum {
42 POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0,
43 POWER_SUPPLY_CHARGE_TYPE_NONE,
44 POWER_SUPPLY_CHARGE_TYPE_TRICKLE,
45 POWER_SUPPLY_CHARGE_TYPE_FAST,
46};
47
48enum {
42 POWER_SUPPLY_HEALTH_UNKNOWN = 0, 49 POWER_SUPPLY_HEALTH_UNKNOWN = 0,
43 POWER_SUPPLY_HEALTH_GOOD, 50 POWER_SUPPLY_HEALTH_GOOD,
44 POWER_SUPPLY_HEALTH_OVERHEAT, 51 POWER_SUPPLY_HEALTH_OVERHEAT,
@@ -58,9 +65,19 @@ enum {
58 POWER_SUPPLY_TECHNOLOGY_LiMn, 65 POWER_SUPPLY_TECHNOLOGY_LiMn,
59}; 66};
60 67
68enum {
69 POWER_SUPPLY_CAPACITY_LEVEL_UNKNOWN = 0,
70 POWER_SUPPLY_CAPACITY_LEVEL_CRITICAL,
71 POWER_SUPPLY_CAPACITY_LEVEL_LOW,
72 POWER_SUPPLY_CAPACITY_LEVEL_NORMAL,
73 POWER_SUPPLY_CAPACITY_LEVEL_HIGH,
74 POWER_SUPPLY_CAPACITY_LEVEL_FULL,
75};
76
61enum power_supply_property { 77enum power_supply_property {
62 /* Properties of type `int' */ 78 /* Properties of type `int' */
63 POWER_SUPPLY_PROP_STATUS = 0, 79 POWER_SUPPLY_PROP_STATUS = 0,
80 POWER_SUPPLY_PROP_CHARGE_TYPE,
64 POWER_SUPPLY_PROP_HEALTH, 81 POWER_SUPPLY_PROP_HEALTH,
65 POWER_SUPPLY_PROP_PRESENT, 82 POWER_SUPPLY_PROP_PRESENT,
66 POWER_SUPPLY_PROP_ONLINE, 83 POWER_SUPPLY_PROP_ONLINE,
@@ -89,6 +106,7 @@ enum power_supply_property {
89 POWER_SUPPLY_PROP_ENERGY_NOW, 106 POWER_SUPPLY_PROP_ENERGY_NOW,
90 POWER_SUPPLY_PROP_ENERGY_AVG, 107 POWER_SUPPLY_PROP_ENERGY_AVG,
91 POWER_SUPPLY_PROP_CAPACITY, /* in percents! */ 108 POWER_SUPPLY_PROP_CAPACITY, /* in percents! */
109 POWER_SUPPLY_PROP_CAPACITY_LEVEL,
92 POWER_SUPPLY_PROP_TEMP, 110 POWER_SUPPLY_PROP_TEMP,
93 POWER_SUPPLY_PROP_TEMP_AMBIENT, 111 POWER_SUPPLY_PROP_TEMP_AMBIENT,
94 POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, 112 POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
@@ -126,6 +144,7 @@ struct power_supply {
126 enum power_supply_property psp, 144 enum power_supply_property psp,
127 union power_supply_propval *val); 145 union power_supply_propval *val);
128 void (*external_power_changed)(struct power_supply *psy); 146 void (*external_power_changed)(struct power_supply *psy);
147 void (*set_charged)(struct power_supply *psy);
129 148
130 /* For APM emulation, think legacy userspace. */ 149 /* For APM emulation, think legacy userspace. */
131 int use_for_apm; 150 int use_for_apm;
@@ -165,8 +184,10 @@ struct power_supply_info {
165 int use_for_apm; 184 int use_for_apm;
166}; 185};
167 186
187extern struct power_supply *power_supply_get_by_name(char *name);
168extern void power_supply_changed(struct power_supply *psy); 188extern void power_supply_changed(struct power_supply *psy);
169extern int power_supply_am_i_supplied(struct power_supply *psy); 189extern int power_supply_am_i_supplied(struct power_supply *psy);
190extern int power_supply_set_battery_charged(struct power_supply *psy);
170 191
171#if defined(CONFIG_POWER_SUPPLY) || defined(CONFIG_POWER_SUPPLY_MODULE) 192#if defined(CONFIG_POWER_SUPPLY) || defined(CONFIG_POWER_SUPPLY_MODULE)
172extern int power_supply_is_system_supplied(void); 193extern int power_supply_is_system_supplied(void);
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
index 0c9878123d5f..38e8c4d9289e 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -293,6 +293,24 @@ struct wm97xx {
293 u16 suspend_mode; /* PRP in suspend mode */ 293 u16 suspend_mode; /* PRP in suspend mode */
294}; 294};
295 295
296struct wm97xx_batt_pdata {
297 int batt_aux;
298 int temp_aux;
299 int charge_gpio;
300 int min_voltage;
301 int max_voltage;
302 int batt_div;
303 int batt_mult;
304 int temp_div;
305 int temp_mult;
306 int batt_tech;
307 char *batt_name;
308};
309
310struct wm97xx_pdata {
311 struct wm97xx_batt_pdata *batt_pdata; /* battery data */
312};
313
296/* 314/*
297 * Codec GPIO access (not supported on WM9705) 315 * Codec GPIO access (not supported on WM9705)
298 * This can be used to set/get codec GPIO and Virtual GPIO status. 316 * This can be used to set/get codec GPIO and Virtual GPIO status.
diff --git a/include/linux/wm97xx_batt.h b/include/linux/wm97xx_batt.h
index 9681d1ab0e4f..a1d6419c2ff8 100644
--- a/include/linux/wm97xx_batt.h
+++ b/include/linux/wm97xx_batt.h
@@ -3,22 +3,12 @@
3 3
4#include <linux/wm97xx.h> 4#include <linux/wm97xx.h>
5 5
6struct wm97xx_batt_info { 6#warning This file will be removed soon, use wm97xx.h instead!
7 int batt_aux; 7
8 int temp_aux; 8#define wm97xx_batt_info wm97xx_batt_pdata
9 int charge_gpio;
10 int min_voltage;
11 int max_voltage;
12 int batt_div;
13 int batt_mult;
14 int temp_div;
15 int temp_mult;
16 int batt_tech;
17 char *batt_name;
18};
19 9
20#ifdef CONFIG_BATTERY_WM97XX 10#ifdef CONFIG_BATTERY_WM97XX
21void __init wm97xx_bat_set_pdata(struct wm97xx_batt_info *data); 11void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data);
22#else 12#else
23static inline void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data) {} 13static inline void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data) {}
24#endif 14#endif