Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105163
b: refs/heads/master
c: a1f7fc4
h: refs/heads/master
i:
  105161: d2da502
  105159: 082e9d9
v: v3
  • Loading branch information
Eric Miao authored and Russell King committed Jul 9, 2008
1 parent 9b09469 commit 230f46c
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c1db1a1333197bc04dfd0c71d15f8ed43eb844d
refs/heads/master: a1f7fc48c143537e2bf70affee7e8932f5be9bb4
42 changes: 42 additions & 0 deletions trunk/arch/arm/mach-pxa/zylonite_pxa300.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include <linux/i2c/pca953x.h>

#include <asm/gpio.h>
#include <asm/arch/mfp-pxa300.h>
#include <asm/arch/i2c.h>
#include <asm/arch/zylonite.h>

#include "generic.h"
Expand Down Expand Up @@ -109,6 +112,10 @@ static mfp_cfg_t common_mfp_cfg[] __initdata = {
GPIO12_MMC2_DAT3,
GPIO13_MMC2_CLK,
GPIO14_MMC2_CMD,

/* Standard I2C */
GPIO21_I2C_SCL,
GPIO22_I2C_SDA,
};

static mfp_cfg_t pxa300_mfp_cfg[] __initdata = {
Expand Down Expand Up @@ -192,6 +199,39 @@ static void __init zylonite_detect_lcd_panel(void)
pxa3xx_mfp_write(lcd_detect_pins[i], mfpr_save[i]);
}

#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
static struct pca953x_platform_data gpio_exp[] = {
[0] = {
.gpio_base = 128,
},
[1] = {
.gpio_base = 144,
},
};

struct i2c_board_info zylonite_i2c_board_info[] = {
{
.type = "pca9539",
.addr = 0x74,
.platform_data = &gpio_exp[0],
.irq = IRQ_GPIO(18),
}, {
.type = "pca9539",
.addr = 0x75,
.platform_data = &gpio_exp[1],
.irq = IRQ_GPIO(19),
},
};

static void __init zylonite_init_i2c(void)
{
pxa_set_i2c_info(NULL);
i2c_register_board_info(0, ARRAY_AND_SIZE(zylonite_i2c_board_info));
}
#else
static inline void zylonite_init_i2c(void) {}
#endif

void __init zylonite_pxa300_init(void)
{
if (cpu_is_pxa300() || cpu_is_pxa310()) {
Expand All @@ -207,6 +247,8 @@ void __init zylonite_pxa300_init(void)

/* WM9713 IRQ */
wm9713_irq = mfp_to_gpio(MFP_PIN_GPIO26);

zylonite_init_i2c();
}

if (cpu_is_pxa300()) {
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-arm/arch-pxa/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@
defined(CONFIG_MACH_PCM027) || \
defined(CONFIG_MACH_MAGICIAN)
#define NR_IRQS (IRQ_BOARD_END)
#elif defined(CONFIG_MACH_ZYLONITE)
#define NR_IRQS (IRQ_BOARD_START + 32)
#else
#define NR_IRQS (IRQ_BOARD_START)
#endif
Expand Down

0 comments on commit 230f46c

Please sign in to comment.