Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208607
b: refs/heads/master
c: d198290
h: refs/heads/master
i:
  208605: 0039633
  208603: 2b7f73e
  208599: 8972209
  208591: 6f34007
  208575: c7ae969
v: v3
  • Loading branch information
Marek Vasut authored and Eric Miao committed Jun 18, 2010
1 parent c8fadeb commit 8a9a54e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ceb4c99f3f117dba16487d7c06790f0238726f8
refs/heads/master: d198290d8250e6318cc31c15e7d017ef4441a438
42 changes: 39 additions & 3 deletions trunk/arch/arm/mach-pxa/z2.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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>
Expand Down Expand Up @@ -451,6 +452,39 @@ static void __init z2_keys_init(void)
static inline void z2_keys_init(void) {}
#endif

/******************************************************************************
* Battery
******************************************************************************/
#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
******************************************************************************/
Expand Down Expand Up @@ -579,12 +613,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();
Expand Down

0 comments on commit 8a9a54e

Please sign in to comment.