Add battery support into Zipit Z2
A message that is not in the archive (sent off-list or not yet received): [email protected]
Eric Miao
AppliedPATCH 1/3 Add battery support into Zipit Z2
Quoted 4 lines · Marek Vasut
This patch adds support for the AER915 battery chip into Zipit Z2 platform file.
Signed-off-by Marek Vasut <[email protected]>
Applied to 'devel'.
Quoted 78 lines
---
?arch/arm/mach-pxa/z2.c | ? 42 +++++++++++++++++++++++++++++++++++++++--- ?1 files changed, 39 insertions(+), 3 deletions(-)arch/arm/mach-pxa/z2.c +0
-0@@ -16,6 +16,7 @@?#include <
linux/mtd/mtd.h>
?#include <linux/mtd/partitions.h>
?#include <linux/pwm_backlight.h>
+#include <linux/z2_battery.h>
?#include <linux/dma-mapping.h>
?#include <linux/spi/spi.h>
?#include <linux/spi/libertas_spi.h>arch/arm/mach-pxa/z2.c +0
-0@@ -458,6 +459,39 @@ static inline void z2_keys_init(void) {}?#endif
?/******************************************************************************
+ * Battery
+ ******************************************************************************/arch/arm/mach-pxa/z2.c +31
-0+#if defined(CONFIG_I2C_PXA ) || defined(CONFIG_I2C_PXA_MODULE ) +static struct z2_battery_info batt_chip_info = { + ? ? ? .batt_I2C_bus ? = 0, + ? ? ? .batt_I2C_addr ?= 0x55, + ? ? ? .batt_I2C_reg ? = 2, + ? ? ? .charge_gpio ? ?= GPIO0_ZIPITZ2_AC_DETECT, + ? ? ? .min_voltage ? ?= 2400000, + ? ? ? .max_voltage ? ?= 3700000, + ? ? ? .batt_div ? ? ? = 69, + ? ? ? .batt_mult ? ? ?= 1000000, + ? ? ? .batt_tech ? ? ?= POWER_SUPPLY_TECHNOLOGY_LION, + ? ? ? .batt_name ? ? ?= "Z2", +}; + +static struct i2c_board_info __initdata z2_i2c_board_info[] = { + ? ? ? { + ? ? ? ? ? ? ? I2C_BOARD_INFO("aer915", 0x55), + ? ? ? ? ? ? ? .platform_data ?= &batt_chip_info, + ? ? ? } +}; + +static void __init z2_i2c_init (void ) +{ + ? ? ? pxa_set_i2c_info(NULL); + ? ? ? i2c_register_board_info(0, ARRAY_AND_SIZE(z2_i2c_board_info)); +} +#else +static inline void z2_i2c_init (void ) {} +#endif + +/****************************************************************************** ?* SSP Devices - WiFi and LCD control ?******************************************************************************/ ?#if
defined(CONFIG_SPI_PXA2XX)||defined(CONFIG_SPI_PXA2XX_MODULE)arch/arm/mach-pxa/z2.c +5
-4@@ -585,12 +619,14 @@ static void __init z2_init(void) ?{ ? ? ? ?pxa2xx_mfp_config(ARRAY_AND_SIZE(z2_pin_config)); + ? ? ? pxa_set_ffuart_info(NULL); + ? ? ? pxa_set_btuart_info(NULL); + ? ? ? pxa_set_stuart_info(NULL); + ? ? ? ?z2_lcd_init(); ? ? ? ?z2_mmc_init(); ? ? ? ?z2_mkp_init(); - - ? ? ? pxa_set_i2c_info(NULL); - + ? ? ? z2_i2c_init(); ? ? ? ?z2_spi_init(); ? ? ? ?z2_nor_init(); ? ? ? ?z2_pwm_init(); --1.7.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 3/3 pxa/z2: Register WM8750
Quoted 4 lines · Marek Vasut
This patch registers the WM8750 codec on a proper place on the ZipitZ2 machine after the WM8750 driver was converted to new API.
Signed-off-by Marek Vasut <[email protected]>
This seems to be dependent on the previous z2 battery support patch. Is this fixing the wm8750 registration bug, otherwise I'll queue this into the -devel branch. Or you can help make this independent of the battery support patch so I can merge this into -fix.
Quoted 24 lines
---
?arch/arm/mach-pxa/z2.c | ? ?5 ++++-
?1 files changed, 4 insertions(+), 1 deletions(-)arch/arm/mach-pxa/z2.c +4
-2@@ -479,7 +479,10 @@ static struct i2c_board_info __initdata z2_i2c_board_info[] = { ? ? ? ?{ ? ? ? ? ? ? ? ?I2C_BOARD_INFO("aer915", 0x55), ? ? ? ? ? ? ? ?.platform_data ?= &batt_chip_info, - ? ? ? } + ? ? ? }, { + ? ? ? ? ? ? ? I2C_BOARD_INFO("wm8750", 0x1b), + ? ? ? }, + ?}; ?static void __init z2_i2c_init(void) --1.7.0
PATCH 3/3 pxa/z2: Register WM8750
Dne ?t 1. ?ervna 2010 08:13:38 Eric Miao napsal(a):
Quoted 10 lines · Marek Vasut
Quoted 4 lines
This patch registers the WM8750 codec on a proper place on the ZipitZ2 machine after the WM8750 driver was converted to new API.
Signed-off-by Marek Vasut <[email protected]>This seems to be dependent on the previous z2 battery support patch. Is this fixing the wm8750 registration bug, otherwise I'll queue this into the -devel branch. Or you can help make this independent of the battery support patch so I can merge this into -fix.
Merge this into -devel please. This patch doesn't fix anything :)
Thanks!
Quoted 23 lines
Quoted 23 lines
--- arch/arm/mach-pxa/z2.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)arch/arm/mach-pxa/z2.c +4
-2@@ -479,7 +479,10 @@ static struct i2c_board_info __initdata z2_i2c_board_info[] = { {I2C_BOARD_INFO ("aer915" ,0x55 ), .platform_data = &batt_chip_info, - } + }, { +I2C_BOARD_INFO ("wm8750" ,0x1b ), + }, + };static void __init z2_i2c_init (void ) --1.7.0
Eric Miao
AppliedPATCH 3/3 pxa/z2: Register WM8750
In reply to a message not in the archiveQuoted 4 lines · Marek Vasut
This patch registers the WM8750 codec on a proper place on the ZipitZ2 machine after the WM8750 driver was converted to new API.
Signed-off-by Marek Vasut <[email protected]>
Applied to 'devel'.