Skip to content

Commit

Permalink
[PATCH] ARM: PXA I2C: add platform device
Browse files Browse the repository at this point in the history
Add the PXA I2C platform device.

Signed-off-by: Russell King <rmk@arm.linux.org.uk>
  • Loading branch information
Russell King committed Apr 30, 2005
1 parent d5aa207 commit bb9bffc
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions arch/arm/mach-pxa/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,38 @@ static struct platform_device stuart_device = {
.id = 2,
};

static struct resource i2c_resources[] = {
{
.start = 0x40301680,
.end = 0x403016a3,
.flags = IORESOURCE_MEM,
}, {
.start = IRQ_I2C,
.end = IRQ_I2C,
.flags = IORESOURCE_IRQ,
},
};

static struct platform_device i2c_device = {
.name = "pxa2xx-i2c",
.id = 0,
.resource = i2c_resources,
.num_resources = ARRAY_SIZE(i2c_resources),
};

void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
{
i2c_device.dev.platform_data = info;
}

static struct platform_device *devices[] __initdata = {
&pxamci_device,
&udc_device,
&pxafb_device,
&ffuart_device,
&btuart_device,
&stuart_device,
&i2c_device,
};

static int __init pxa_init(void)
Expand Down

0 comments on commit bb9bffc

Please sign in to comment.