Skip to content

Commit

Permalink
MX1:apf9328: Add i2c support
Browse files Browse the repository at this point in the history
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@armadeus.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
  • Loading branch information
Gwenhael Goavec-Merou authored and Sascha Hauer committed Jan 3, 2012
1 parent 384703b commit 7a99481
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-imx/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ config MACH_SCB9328
config MACH_APF9328
bool "APF9328"
select SOC_IMX1
select IMX_HAVE_PLATFORM_IMX_I2C
select IMX_HAVE_PLATFORM_IMX_UART
help
Say Yes here if you are using the Armadeus APF9328 development board
Expand Down
10 changes: 10 additions & 0 deletions arch/arm/mach-imx/mach-apf9328.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/dm9000.h>
#include <linux/i2c.h>

#include <asm/mach-types.h>
#include <asm/mach/arch.h>
Expand All @@ -41,6 +42,9 @@ static const int apf9328_pins[] __initconst = {
PB29_PF_UART2_RTS,
PB30_PF_UART2_TXD,
PB31_PF_UART2_RXD,
/* I2C */
PA15_PF_I2C_SDA,
PA16_PF_I2C_SCL,
};

/*
Expand Down Expand Up @@ -103,6 +107,10 @@ static const struct imxuart_platform_data uart1_pdata __initconst = {
.flags = IMXUART_HAVE_RTSCTS,
};

static const struct imxi2c_platform_data apf9328_i2c_data __initconst = {
.bitrate = 100000,
};

static struct platform_device *devices[] __initdata = {
&apf9328_flash_device,
&dm9000x_device,
Expand All @@ -119,6 +127,8 @@ static void __init apf9328_init(void)
imx1_add_imx_uart0(NULL);
imx1_add_imx_uart1(&uart1_pdata);

imx1_add_imx_i2c(&apf9328_i2c_data);

platform_add_devices(devices, ARRAY_SIZE(devices));
}

Expand Down

0 comments on commit 7a99481

Please sign in to comment.