summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2009-08-31 06:20:12 +0200
committerAnton Vorontsov <avorontsov@ru.mvista.com>2009-09-04 20:20:58 +0400
commitb8bdc1d0cfc488ac0d94724639f9a61b0a5a1d40 (patch)
tree7a0748ce1b1dd440658cb20320037c92b651267d /include/linux
parent32bb0e0c778a4a6cd4534a5b98f08cd45e9ab5b9 (diff)
downloadlinux-3.10-b8bdc1d0cfc488ac0d94724639f9a61b0a5a1d40.tar.gz
linux-3.10-b8bdc1d0cfc488ac0d94724639f9a61b0a5a1d40.tar.bz2
linux-3.10-b8bdc1d0cfc488ac0d94724639f9a61b0a5a1d40.zip
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/linux')
-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 6f69968eab2..b2c2297844e 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -286,6 +286,24 @@ struct wm97xx {
u16 suspend_mode; /* PRP in suspend mode */
};
+struct wm97xx_batt_pdata {
+ int batt_aux;
+ int temp_aux;
+ int charge_gpio;
+ int min_voltage;
+ int max_voltage;
+ int batt_div;
+ int batt_mult;
+ int temp_div;
+ int temp_mult;
+ int batt_tech;
+ char *batt_name;
+};
+
+struct wm97xx_pdata {
+ struct wm97xx_batt_pdata *batt_pdata; /* battery data */
+};
+
/*
* Codec GPIO access (not supported on WM9705)
* 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 9681d1ab0e4..a1d6419c2ff 100644
--- a/include/linux/wm97xx_batt.h
+++ b/include/linux/wm97xx_batt.h
@@ -3,22 +3,12 @@
#include <linux/wm97xx.h>
-struct wm97xx_batt_info {
- int batt_aux;
- int temp_aux;
- int charge_gpio;
- int min_voltage;
- int max_voltage;
- int batt_div;
- int batt_mult;
- int temp_div;
- int temp_mult;
- int batt_tech;
- char *batt_name;
-};
+#warning This file will be removed soon, use wm97xx.h instead!
+
+#define wm97xx_batt_info wm97xx_batt_pdata
#ifdef CONFIG_BATTERY_WM97XX
-void __init wm97xx_bat_set_pdata(struct wm97xx_batt_info *data);
+void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data);
#else
static inline void wm97xx_bat_set_pdata(struct wm97xx_batt_info *data) {}
#endif