From: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org> To: Colin Cross <ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org> Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Subject: [PATCH 2/6] ARM: tegra: paz00: register i2c busses Date: Thu, 19 May 2011 14:08:26 +0200 [thread overview] Message-ID: <1305806910-3903-3-git-send-email-marvin24@gmx.de> (raw) In-Reply-To: <1305806910-3903-1-git-send-email-marvin24-Mmb7MZpHnFY@public.gmane.org> 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-Mmb7MZpHnFY@public.gmane.org> --- arch/arm/mach-tegra/board-paz00.c | 27 +++++++++++++++++++++++++++ 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 57e50a8..5f1c110 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -25,6 +25,8 @@ #include <linux/dma-mapping.h> #include <linux/pda_power.h> #include <linux/io.h> +#include <linux/i2c.h> +#include <linux/i2c-tegra.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = { &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, 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; platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); + + paz00_i2c_init(); } MACHINE_START(PAZ00, "paz00") -- 1.7.4.2
WARNING: multiple messages have this Message-ID (diff)
From: marvin24@gmx.de (Marc Dietrich) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/6] ARM: tegra: paz00: register i2c busses Date: Thu, 19 May 2011 14:08:26 +0200 [thread overview] Message-ID: <1305806910-3903-3-git-send-email-marvin24@gmx.de> (raw) In-Reply-To: <1305806910-3903-1-git-send-email-marvin24@gmx.de> 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> --- arch/arm/mach-tegra/board-paz00.c | 27 +++++++++++++++++++++++++++ 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 57e50a8..5f1c110 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -25,6 +25,8 @@ #include <linux/dma-mapping.h> #include <linux/pda_power.h> #include <linux/io.h> +#include <linux/i2c.h> +#include <linux/i2c-tegra.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -70,6 +72,29 @@ static struct platform_device *paz00_devices[] __initdata = { &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, 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; platform_add_devices(paz00_devices, ARRAY_SIZE(paz00_devices)); + + paz00_i2c_init(); } MACHINE_START(PAZ00, "paz00") -- 1.7.4.2
next prev parent reply other threads:[~2011-05-19 12:08 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-05-19 12:08 [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40 Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich [not found] ` <1305806910-3903-1-git-send-email-marvin24-Mmb7MZpHnFY@public.gmane.org> 2011-05-19 12:08 ` [PATCH 1/6] ARM: tegra: paz00: whitespace cleanup Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich [this message] 2011-05-19 12:08 ` [PATCH 2/6] ARM: tegra: paz00: register i2c busses Marc Dietrich 2011-05-19 12:08 ` [PATCH 3/6] ARM: tegra: paz00: enable usb ports Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich 2011-05-19 12:08 ` [PATCH 4/6] ARM: tegra: paz00: cleanup sdhci ports Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich 2011-05-19 12:08 ` [PATCH 5/6] ARM: tegra: paz00: change the machine name Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich 2011-05-19 12:08 ` [PATCH 6/6] ARM: tegra: paz00: enable wifi card Marc Dietrich 2011-05-19 12:08 ` Marc Dietrich 2011-05-19 20:06 ` Dmitry Artamonow 2011-05-19 20:06 ` Dmitry Artamonow 2011-05-20 7:50 ` Marc Dietich 2011-05-20 7:50 ` Marc Dietich 2011-07-10 22:14 ` [PATCH 0/6 V2] ARM: tegra: paz00 patches for 2.6.40 Colin Cross 2011-07-10 22:14 ` Colin Cross [not found] ` <CAMbhsRSH2iyv0_1seVtwSQ7AbHmPbz+VqSVkhfLgsNA8+dOwJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2011-07-12 10:47 ` Marc Dietrich 2011-07-12 10:47 ` Marc Dietrich
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1305806910-3903-3-git-send-email-marvin24@gmx.de \ --to=marvin24-mmb7mzphnfy@public.gmane.org \ --cc=ccross-z5hGa2qSFaRBDgjK7y7TUQ@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.