summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/devices.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-07-10 14:37:22 -0700
committerColin Cross <ccross@android.com>2011-07-12 20:39:02 -0700
commit78702e43c1cadd600e35374411caba82ad9354b6 (patch)
tree3ec6156ccc3eb814e8b2e0d17d337557be91775e /arch/arm/mach-tegra/devices.c
parent4c755997ea1eb3e3c2df7ef657494d8188d0c120 (diff)
downloadblackbird-op-linux-78702e43c1cadd600e35374411caba82ad9354b6.tar.gz
blackbird-op-linux-78702e43c1cadd600e35374411caba82ad9354b6.zip
ARM: tegra: remove copy-and-pasted i2c platform data in boards
Every board file includes the same platform data definition for the i2c-tegra driver's bus speed. Move the platform data into devices.c, and remove it from all the board files. Signed-off-by: Colin Cross <ccross@android.com> Tested-by: Konstantin Sinyuk <kostyas@compulab.co.il> Acked-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/devices.c')
-rw-r--r--arch/arm/mach-tegra/devices.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c
index 1528f9daef1f..066eaf9533fe 100644
--- a/arch/arm/mach-tegra/devices.c
+++ b/arch/arm/mach-tegra/devices.c
@@ -22,6 +22,7 @@
#include <linux/dma-mapping.h>
#include <linux/fsl_devices.h>
#include <linux/serial_8250.h>
+#include <linux/i2c-tegra.h>
#include <asm/pmu.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
@@ -79,13 +80,29 @@ static struct resource i2c_resource4[] = {
},
};
+static struct tegra_i2c_platform_data tegra_i2c1_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
+static struct tegra_i2c_platform_data tegra_i2c2_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
+static struct tegra_i2c_platform_data tegra_i2c3_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
+static struct tegra_i2c_platform_data tegra_dvc_platform_data = {
+ .bus_clk_rate = 400000,
+};
+
struct platform_device tegra_i2c_device1 = {
.name = "tegra-i2c",
.id = 0,
.resource = i2c_resource1,
.num_resources = ARRAY_SIZE(i2c_resource1),
.dev = {
- .platform_data = 0,
+ .platform_data = &tegra_i2c1_platform_data,
},
};
@@ -95,7 +112,7 @@ struct platform_device tegra_i2c_device2 = {
.resource = i2c_resource2,
.num_resources = ARRAY_SIZE(i2c_resource2),
.dev = {
- .platform_data = 0,
+ .platform_data = &tegra_i2c2_platform_data,
},
};
@@ -105,7 +122,7 @@ struct platform_device tegra_i2c_device3 = {
.resource = i2c_resource3,
.num_resources = ARRAY_SIZE(i2c_resource3),
.dev = {
- .platform_data = 0,
+ .platform_data = &tegra_i2c3_platform_data,
},
};
@@ -115,7 +132,7 @@ struct platform_device tegra_i2c_device4 = {
.resource = i2c_resource4,
.num_resources = ARRAY_SIZE(i2c_resource4),
.dev = {
- .platform_data = 0,
+ .platform_data = &tegra_dvc_platform_data,
},
};
OpenPOWER on IntegriCloud