mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 05:11:48 +00:00
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>
This commit is contained in:
parent
4592de7da8
commit
dda9cd289c
@ -25,6 +25,8 @@
|
|||||||
#include <linux/dma-mapping.h>
|
#include <linux/dma-mapping.h>
|
||||||
#include <linux/pda_power.h>
|
#include <linux/pda_power.h>
|
||||||
#include <linux/io.h>
|
#include <linux/io.h>
|
||||||
|
#include <linux/i2c.h>
|
||||||
|
#include <linux/i2c-tegra.h>
|
||||||
|
|
||||||
#include <asm/mach-types.h>
|
#include <asm/mach-types.h>
|
||||||
#include <asm/mach/arch.h>
|
#include <asm/mach/arch.h>
|
||||||
@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = {
|
|||||||
&tegra_sdhci_device4,
|
&tegra_sdhci_device4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct tegra_i2c_platform_data paz00_i2c1_platform_data = {
|
||||||
|
.bus_clk_rate = 400000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct tegra_i2c_platform_data paz00_i2c2_platform_data = {
|
||||||
|
.bus_clk_rate = 400000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct tegra_i2c_platform_data paz00_dvc_platform_data = {
|
||||||
|
.bus_clk_rate = 400000,
|
||||||
|
};
|
||||||
|
|
||||||
|
static void paz00_i2c_init(void)
|
||||||
|
{
|
||||||
|
tegra_i2c_device1.dev.platform_data = &paz00_i2c1_platform_data;
|
||||||
|
tegra_i2c_device2.dev.platform_data = &paz00_i2c2_platform_data;
|
||||||
|
tegra_i2c_device4.dev.platform_data = &paz00_dvc_platform_data;
|
||||||
|
|
||||||
|
platform_device_register(&tegra_i2c_device1);
|
||||||
|
platform_device_register(&tegra_i2c_device2);
|
||||||
|
platform_device_register(&tegra_i2c_device4);
|
||||||
|
}
|
||||||
|
|
||||||
static void __init tegra_paz00_fixup(struct machine_desc *desc,
|
static void __init tegra_paz00_fixup(struct machine_desc *desc,
|
||||||
struct tag *tags, char **cmdline, struct meminfo *mi)
|
struct tag *tags, char **cmdline, struct meminfo *mi)
|
||||||
{
|
{
|
||||||
@ -115,6 +140,8 @@ static void __init tegra_paz00_init(void)
|
|||||||
tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
|
tegra_sdhci_device4.dev.platform_data = &sdhci_pdata4;
|
||||||
|
|
||||||
platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
|
platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices));
|
||||||
|
|
||||||
|
paz00_i2c_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(PAZ00, "paz00")
|
MACHINE_START(PAZ00, "paz00")
|
||||||
|
Loading…
Reference in New Issue
Block a user