aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-08-31 00:20:12 -0400
committerAnton Vorontsov <avorontsov@ru.mvista.com>2009-09-04 12:20:58 -0400
commitb8bdc1d0cfc488ac0d94724639f9a61b0a5a1d40 (patch)
tree7a0748ce1b1dd440658cb20320037c92b651267d /include
parent32bb0e0c778a4a6cd4534a5b98f08cd45e9ab5b9 (diff)
wm97xx_battery: Use platform_data
This patch converts the wm97xx-battery driver to use platform_data supplied by ac97 bus. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/wm97xx.h18
-rw-r--r--include/linux/wm97xx_batt.h18
2 files changed, 22 insertions, 14 deletions
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
index 6f69968eab24..b2c2297844e3 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -286,6 +286,24 @@ struct wm97xx {
286 u16 suspend_mode; /* PRP in suspend mode */ 286 u16 suspend_mode; /* PRP in suspend mode */
287}; 287};
288 288
289struct wm97xx_batt_pdata {
290 int batt_aux;
291 int temp_aux;
292 int charge_gpio;
293 int min_voltage;
294 int max_voltage;
295 int batt_div;
296 int batt_mult;
297 int temp_div;
298 int temp_mult;
299 int batt_tech;
300 char *batt_name;
301};
302
303struct wm97xx_pdata {
304 struct wm97xx_batt_pdata *batt_pdata; /* battery data */
305};
306
289/* 307/*
290 * Codec GPIO access (not supported on WM9705) 308 * Codec GPIO access (not supported on WM9705)
291 * This can be used to set/get codec GPIO and Virtual GPIO status. 309 * 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