]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ARM: imx: dynamically register imx-i2c devices (imx21)
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 22 Jun 2010 07:27:33 +0000 (09:27 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 30 Jun 2010 07:00:39 +0000 (09:00 +0200)
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
arch/arm/mach-imx/devices-imx21.h
arch/arm/mach-imx/devices.c
arch/arm/mach-imx/devices.h

index e85dcb1b4604ee00499a12ef901033ef36883fb9..c6e5f50a7297cce388f75a95b5d2a40fdee2da56 100644 (file)
@@ -9,5 +9,8 @@
 #include <mach/mx21.h>
 #include <mach/devices-common.h>
 
+#define imx21_add_i2c_imx(pdata)       \
+       imx_add_imx_i2c(0, MX2x_I2C_BASE_ADDR, SZ_4K, MX2x_INT_I2C, pdata)
+
 #define imx21_add_mxc_nand(pdata)      \
        imx_add_mxc_nand_v1(MX21_NFC_BASE_ADDR, MX21_INT_NANDFC, pdata)
index a34ad60e8f0a3046f757477174120794cccf834d..b9f5b69df8f1416dcb0a440d85f1daed1d5ba5bf 100644 (file)
@@ -368,6 +368,7 @@ struct platform_device mxc_fec_device = {
 };
 #endif
 
+#ifdef CONFIG_MACH_MX27
 #define DEFINE_IMX_I2C_DEVICE(n, baseaddr, irq)                                \
        static struct resource mxc_i2c_resources ## n[] = {             \
                {                                                       \
@@ -390,7 +391,6 @@ struct platform_device mxc_fec_device = {
 
 DEFINE_IMX_I2C_DEVICE(0, MX2x_I2C_BASE_ADDR, MX2x_INT_I2C);
 
-#ifdef CONFIG_MACH_MX27
 DEFINE_IMX_I2C_DEVICE(1, MX27_I2C2_BASE_ADDR, MX27_INT_I2C2);
 #endif
 
index b4eb8a0c620796c855179781a082e801646634bf..dcaa4f96ed3ab31022c51c7c6f3d7a18aff3ed09 100644 (file)
@@ -28,8 +28,8 @@ extern struct platform_device mxc_w1_master_device;
 extern struct platform_device mxc_fb_device;
 extern struct platform_device mxc_fec_device;
 extern struct platform_device mxc_pwm_device;
-extern struct platform_device mxc_i2c_device0;
 #ifdef CONFIG_MACH_MX27
+extern struct platform_device mxc_i2c_device0;
 extern struct platform_device mxc_i2c_device1;
 #endif
 extern struct platform_device mxc_sdhc_device0;