aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-paz00.c
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2011-05-19 08:08:26 -0400
committerColin Cross <ccross@android.com>2011-07-12 23:38:55 -0400
commitdda9cd289ca781593354cf9ad9c091aa5a1260a8 (patch)
tree76c2f52d93ff486c6b19165abcb5c79bb9adea70 /arch/arm/mach-tegra/board-paz00.c
parent4592de7da8ec8d7d8d84da72aa517c145826dcc3 (diff)
ARM: tegra: paz00: register i2c busses
This adds support for the i2c busses on paz00. The 3rd bus is reserved for the nvec, which acts as master and i2c-tegra has not yet support for this kind of operation. The sound codec (alc5632) is connected to the first bus and will be added once the codec and glue driver is upstream. The thermal sensor (atd7461) is connected to dvc as usual, but will not be added now because i2c-tegra still misses probe support (needs I2C_FUNC_SMBUS_EMUL). Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Colin Cross <ccross@android.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-paz00.c')
-rw-r--r--arch/arm/mach-tegra/board-paz00.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index 57e50a823eec..5f1c110c508b 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -25,6 +25,8 @@
25#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
26#include <linux/pda_power.h> 26#include <linux/pda_power.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/i2c.h>
29#include <linux/i2c-tegra.h>
28 30
29#include <asm/mach-types.h> 31#include <asm/mach-types.h>
30#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = {
70 &tegra_sdhci_device4, 72 &tegra_sdhci_device4,
71}; 73};
72 74
75static struct tegra_i2c_platform_data paz00_i2c1_platform_data = {
76 .bus_clk_rate = 400000,
77};
78
79static struct tegra_i2c_platform_data paz00_i2c2_platform_data = {
80 .bus_clk_rate = 400000,
81};
82
83static struct tegra_i2c_platform_data paz00_dvc_platform_data = {
84 .bus_clk_rate = 400000,
85};
86
87static void paz00_i2c_init(void)
88{
89 tegra_i2c_device1.dev.platform_data = &paz00_i2c1_platform_data;
90 tegra_i2c_device2.dev.platform_data = &paz00_i2c2_platform_data;
91 tegra_i2c_device4.dev.platform_data = &paz00_dvc_platform_data;
92
93 platform_device_register(&tegra_i2c_device1);
94 platform_device_register(&tegra_i2c_device2);
95 platform_device_register(&tegra_i2c_device4);
96}
97
73static void __init tegra_paz00_fixup(struct machine_desc *desc, 98static void __init tegra_paz00_fixup(struct machine_desc *desc,
74 struct tag *tags, char **cmdline, struct meminfo *mi) 99 struct tag *tags, char **cmdline, struct meminfo *mi)
75{ 100{
@@ -115,6 +140,8 @@ static void __init tegra_paz00_init(void)
115 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4; 140 tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
116 141
117 platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); 142 platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
143
144 paz00_i2c_init();
118} 145}
119 146
120MACHINE_START(PAZ00, "paz00") 147MACHINE_START(PAZ00, "paz00")