Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199405
b: refs/heads/master
c: d162251
h: refs/heads/master
i:
  199403: d9d71d0
v: v3
  • Loading branch information
Mattias Wallin authored and Samuel Ortiz committed May 27, 2010
1 parent ef3ac9a commit e9f21a9
Show file tree
Hide file tree
Showing 3 changed files with 63 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: 09bcb3f3369e164bf51b3b566b865f2514b23e8c
refs/heads/master: d162251d1b8860ef489aecb712e5f06c33763ef3
55 changes: 55 additions & 0 deletions trunk/arch/arm/mach-u300/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
/* BUCK SLEEP 0xAC: 1.05V, Not used, SLEEP_A and B, Not used */
#define BUCK_SLEEP_SETTING 0xAC

#ifdef CONFIG_AB3100_CORE
static struct regulator_consumer_supply supply_ldo_c[] = {
{
.dev_name = "ab3100-codec",
Expand Down Expand Up @@ -253,14 +254,68 @@ static struct ab3100_platform_data ab3100_plf_data = {
LDO_D_SETTING,
},
};
#endif

#ifdef CONFIG_AB3550_CORE
static struct abx500_init_settings ab3550_init_settings[] = {
{
.bank = 0,
.reg = AB3550_IMR1,
.setting = 0xff
},
{
.bank = 0,
.reg = AB3550_IMR2,
.setting = 0xff
},
{
.bank = 0,
.reg = AB3550_IMR3,
.setting = 0xff
},
{
.bank = 0,
.reg = AB3550_IMR4,
.setting = 0xff
},
{
.bank = 0,
.reg = AB3550_IMR5,
/* The two most significant bits are not used */
.setting = 0x3f
},
};

static struct ab3550_platform_data ab3550_plf_data = {
.irq = {
.base = IRQ_AB3550_BASE,
.count = (IRQ_AB3550_END - IRQ_AB3550_BASE + 1),
},
.dev_data = {
},
.init_settings = ab3550_init_settings,
.init_settings_sz = ARRAY_SIZE(ab3550_init_settings),
};
#endif

static struct i2c_board_info __initdata bus0_i2c_board_info[] = {
#if defined(CONFIG_AB3550_CORE)
{
.type = "ab3550",
.addr = 0x4A,
.irq = IRQ_U300_IRQ0_EXT,
.platform_data = &ab3550_plf_data,
},
#elif defined(CONFIG_AB3100_CORE)
{
.type = "ab3100",
.addr = 0x48,
.irq = IRQ_U300_IRQ0_EXT,
.platform_data = &ab3100_plf_data,
},
#else
{ },
#endif
};

static struct i2c_board_info __initdata bus1_i2c_board_info[] = {
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-u300/include/mach/irqs.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@
#define U300_NR_IRQS 48
#endif

#ifdef CONFIG_AB3550_CORE
#define IRQ_AB3550_BASE (U300_NR_IRQS)
#define IRQ_AB3550_END (IRQ_AB3550_BASE + 37)

#define NR_IRQS (IRQ_AB3550_END + 1)
#else
#define NR_IRQS U300_NR_IRQS
#endif

#endif

0 comments on commit e9f21a9

Please sign in to comment.