arch: arm: tegra: Add i2c slave devices
Chaitanya Bandi [Fri, 3 Feb 2012 10:51:00 +0000 (15:51 +0530)]
Added i2c slave devices for i2c controllers.

Bug 837139

Change-Id: I407d846d0fc2409acfe7de005be1d0da9921b491
Signed-off-by: Chaitanya Bandi <bandik@nvidia.com>
Reviewed-on: http://git-master/r/96681
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index e52f56a..3e23d1f 100644 (file)
@@ -364,6 +364,58 @@ struct platform_device tegra11_i2c_device5 = {
 };
 #endif
 
+struct platform_device tegra_i2c_slave_device1 = {
+       .name           = "tegra-i2c-slave",
+       .id             = 0,
+       .resource       = i2c_resource1,
+       .num_resources  = ARRAY_SIZE(i2c_resource1),
+       .dev = {
+               .platform_data = 0,
+       },
+};
+
+struct platform_device tegra_i2c_slave_device2 = {
+       .name           = "tegra-i2c-slave",
+       .id             = 1,
+       .resource       = i2c_resource2,
+       .num_resources  = ARRAY_SIZE(i2c_resource2),
+       .dev = {
+               .platform_data = 0,
+       },
+};
+
+struct platform_device tegra_i2c_slave_device3 = {
+       .name           = "tegra-i2c-slave",
+       .id             = 2,
+       .resource       = i2c_resource3,
+       .num_resources  = ARRAY_SIZE(i2c_resource3),
+       .dev = {
+               .platform_data = 0,
+       },
+};
+
+struct platform_device tegra_i2c_slave_device4 = {
+       .name           = "tegra-i2c-slave",
+       .id             = 3,
+       .resource       = i2c_resource4,
+       .num_resources  = ARRAY_SIZE(i2c_resource4),
+       .dev = {
+               .platform_data = 0,
+       },
+};
+
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
+struct platform_device tegra_i2c_slave_device5 = {
+       .name           = "tegra-i2c-slave",
+       .id             = 4,
+       .resource       = i2c_resource5,
+       .num_resources  = ARRAY_SIZE(i2c_resource5),
+       .dev = {
+               .platform_data = 0,
+       },
+};
+#endif
+
 static struct resource spi_resource1[] = {
        [0] = {
                .start  = INT_SPI_1,
index c1794b0..f1cd106 100644 (file)
@@ -48,6 +48,13 @@ extern struct platform_device tegra11_i2c_device4;
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
 extern struct platform_device tegra11_i2c_device5;
 #endif
+extern struct platform_device tegra_i2c_slave_device1;
+extern struct platform_device tegra_i2c_slave_device2;
+extern struct platform_device tegra_i2c_slave_device3;
+extern struct platform_device tegra_i2c_slave_device4;
+#ifndef CONFIG_ARCH_TEGRA_2x_SOC
+extern struct platform_device tegra_i2c_slave_device5;
+#endif
 extern struct platform_device tegra_spi_device1;
 extern struct platform_device tegra_spi_device2;
 extern struct platform_device tegra_spi_device3;