diff options
author | Marek VaĊĦut <marek.vasut@gmail.com> | 2008-09-11 14:37:32 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-02 17:48:34 -0400 |
commit | 4e9687d9c843dc34d368358a36f5f1610e4fbab3 (patch) | |
tree | 54ee159fff8a1b6064cbc1f4e97f8c4d918c5d02 /arch/arm/mach-pxa/palmtx.c | |
parent | c49e1e63a9c7893d9ff9be4258d86ddc5485d712 (diff) |
[ARM] 5248/1: wm97xx generic battery driver
This patch adds generic battery driver for wm97xx chips.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-rw-r--r-- | arch/arm/mach-pxa/palmtx.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index fe924a23debe..4447711c9fc6 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/pda_power.h> | 25 | #include <linux/pda_power.h> |
26 | #include <linux/pwm_backlight.h> | 26 | #include <linux/pwm_backlight.h> |
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/wm97xx_batt.h> | ||
29 | #include <linux/power_supply.h> | ||
28 | 30 | ||
29 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -340,6 +342,23 @@ static struct platform_device power_supply = { | |||
340 | }; | 342 | }; |
341 | 343 | ||
342 | /****************************************************************************** | 344 | /****************************************************************************** |
345 | * WM97xx battery | ||
346 | ******************************************************************************/ | ||
347 | static struct wm97xx_batt_info wm97xx_batt_pdata = { | ||
348 | .batt_aux = WM97XX_AUX_ID3, | ||
349 | .temp_aux = WM97XX_AUX_ID2, | ||
350 | .charge_gpio = -1, | ||
351 | .max_voltage = PALMTX_BAT_MAX_VOLTAGE, | ||
352 | .min_voltage = PALMTX_BAT_MIN_VOLTAGE, | ||
353 | .batt_mult = 1000, | ||
354 | .batt_div = 414, | ||
355 | .temp_mult = 1, | ||
356 | .temp_div = 1, | ||
357 | .batt_tech = POWER_SUPPLY_TECHNOLOGY_LIPO, | ||
358 | .batt_name = "main-batt", | ||
359 | }; | ||
360 | |||
361 | /****************************************************************************** | ||
343 | * Framebuffer | 362 | * Framebuffer |
344 | ******************************************************************************/ | 363 | ******************************************************************************/ |
345 | static struct pxafb_mode_info palmtx_lcd_modes[] = { | 364 | static struct pxafb_mode_info palmtx_lcd_modes[] = { |
@@ -401,6 +420,7 @@ static void __init palmtx_init(void) | |||
401 | pxa_set_ac97_info(NULL); | 420 | pxa_set_ac97_info(NULL); |
402 | pxa_set_ficp_info(&palmtx_ficp_platform_data); | 421 | pxa_set_ficp_info(&palmtx_ficp_platform_data); |
403 | pxa_set_keypad_info(&palmtx_keypad_platform_data); | 422 | pxa_set_keypad_info(&palmtx_keypad_platform_data); |
423 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); | ||
404 | 424 | ||
405 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 425 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
406 | } | 426 | } |