aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2011-03-04 18:26:46 -0500
committerOlof Johansson <olof@lixom.net>2011-03-07 18:44:32 -0500
commitde4855d928409caf9c366a9af643bb855aab6bf6 (patch)
treea0c9238e633aa1880b676a241b40961ec87e99a4 /arch/arm/mach-tegra
parentf9a795af4d3b886140e790507a9158ebe3bc6a4a (diff)
ARM: tegra: harmony: register i2c devices
Register the base i2c busses on harmony. Devices coming at a later date, but this allows for hand-probing of some of them at least. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-harmony.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 38c2ab864503..ea908cd0d550 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -24,6 +24,8 @@
24#include <linux/pda_power.h> 24#include <linux/pda_power.h>
25#include <linux/io.h> 25#include <linux/io.h>
26#include <linux/gpio.h> 26#include <linux/gpio.h>
27#include <linux/i2c.h>
28#include <linux/i2c-tegra.h>
27 29
28#include <asm/mach-types.h> 30#include <asm/mach-types.h>
29#include <asm/mach/arch.h> 31#include <asm/mach/arch.h>
@@ -78,6 +80,35 @@ static struct platform_device harmony_audio_device = {
78 }, 80 },
79}; 81};
80 82
83static struct tegra_i2c_platform_data harmony_i2c1_platform_data = {
84 .bus_clk_rate = 400000,
85};
86
87static struct tegra_i2c_platform_data harmony_i2c2_platform_data = {
88 .bus_clk_rate = 400000,
89};
90
91static struct tegra_i2c_platform_data harmony_i2c3_platform_data = {
92 .bus_clk_rate = 400000,
93};
94
95static struct tegra_i2c_platform_data harmony_dvc_platform_data = {
96 .bus_clk_rate = 400000,
97};
98
99static void __init harmony_i2c_init(void)
100{
101 tegra_i2c_device1.dev.platform_data = &harmony_i2c1_platform_data;
102 tegra_i2c_device2.dev.platform_data = &harmony_i2c2_platform_data;
103 tegra_i2c_device3.dev.platform_data = &harmony_i2c3_platform_data;
104 tegra_i2c_device4.dev.platform_data = &harmony_dvc_platform_data;
105
106 platform_device_register(&tegra_i2c_device1);
107 platform_device_register(&tegra_i2c_device2);
108 platform_device_register(&tegra_i2c_device3);
109 platform_device_register(&tegra_i2c_device4);
110}
111
81static struct platform_device *harmony_devices[] __initdata = { 112static struct platform_device *harmony_devices[] __initdata = {
82 &debug_uart, 113 &debug_uart,
83 &tegra_sdhci_device1, 114 &tegra_sdhci_device1,
@@ -140,6 +171,7 @@ static void __init tegra_harmony_init(void)
140 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; 171 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
141 172
142 platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices)); 173 platform_add_devices(harmony_devices, ARRAY_SIZE(harmony_devices));
174 harmony_i2c_init();
143} 175}
144 176
145MACHINE_START(HARMONY, "harmony") 177MACHINE_START(HARMONY, "harmony")