public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4-V1] AM3517: Enable I2C-GPIO Expander driver support for AM3517EVM
@ 2010-01-11  6:20 hvaibhav
  2010-02-05  1:05 ` [APPLIED] [PATCH 4/4-V1] AM3517: Enable I2C-GPIO Expander driver support for Tony Lindgren
  0 siblings, 1 reply; 2+ messages in thread
From: hvaibhav @ 2010-01-11  6:20 UTC (permalink / raw)
  To: linux-omap; +Cc: tony, khilman, Vaibhav Hiremath

From: Vaibhav Hiremath <hvaibhav@ti.com>

Add platform hook-up interface to support I2C based GPIo expander
(TCA6416).

There are 3 instances of I2C Expander on AM3517EVM,
	- One is over I2C-2 mounted on Base board
	- Two are over I2C3 mounted on UI Card

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
 arch/arm/mach-omap2/board-am3517evm.c |   37 +++++++++++++++++++++++++++++++-
 1 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index 67edb0f..1e1ab68 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -22,6 +22,7 @@
 #include <linux/gpio.h>
 #include <linux/irq.h>
 #include <linux/i2c/tsc2004.h>
+#include <linux/i2c/pca953x.h>

 #include <mach/hardware.h>
 #include <mach/am35xx.h>
@@ -97,12 +98,44 @@ static struct i2c_board_info __initdata am3517evm_i2c_boardinfo[] = {
 	},
 };

+/*
+ * I2C GPIO Expander - TCA6416
+ */
+/* Mounted on Base-Board */
+static struct pca953x_platform_data am3517evm_gpio_expander_info_0 = {
+	.gpio_base	= OMAP_MAX_GPIO_LINES,
+};
+static struct i2c_board_info __initdata am3517evm_tca6516_info_0[] = {
+	{
+		I2C_BOARD_INFO("tca6416", 0x21),
+		.platform_data = &am3517evm_gpio_expander_info_0,
+	},
+};
+/* Mounted on UI Card */
+static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_1 = {
+	.gpio_base	= OMAP_MAX_GPIO_LINES + 16,
+};
+static struct pca953x_platform_data am3517evm_ui_gpio_expander_info_2 = {
+	.gpio_base	= OMAP_MAX_GPIO_LINES + 32,
+};
+static struct i2c_board_info __initdata am3517evm_ui_tca6516_info[] = {
+	{
+		I2C_BOARD_INFO("tca6416", 0x20),
+		.platform_data = &am3517evm_ui_gpio_expander_info_1,
+	},
+	{
+		I2C_BOARD_INFO("tca6416", 0x21),
+		.platform_data = &am3517evm_ui_gpio_expander_info_2,
+	},
+};

 static int __init am3517_evm_i2c_init(void)
 {
 	omap_register_i2c_bus(1, 400, NULL, 0);
-	omap_register_i2c_bus(2, 400, NULL, 0);
-	omap_register_i2c_bus(3, 400, NULL, 0);
+	omap_register_i2c_bus(2, 400, am3517evm_tca6516_info_0,
+			ARRAY_SIZE(am3517evm_tca6516_info_0));
+	omap_register_i2c_bus(3, 400, am3517evm_ui_tca6516_info,
+			ARRAY_SIZE(am3517evm_ui_tca6516_info));

 	return 0;
 }
--
1.6.2.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [APPLIED] [PATCH 4/4-V1] AM3517: Enable I2C-GPIO Expander driver support for
  2010-01-11  6:20 [PATCH 4/4-V1] AM3517: Enable I2C-GPIO Expander driver support for AM3517EVM hvaibhav
@ 2010-02-05  1:05 ` Tony Lindgren
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Lindgren @ 2010-02-05  1:05 UTC (permalink / raw)
  To: linux-omap

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: for-next

Initial commit ID (Likely to change): 2029228d29b58312307f9044fbd324f558bd6ef6

PatchWorks
http://patchwork.kernel.org/patch/72103/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=2029228d29b58312307f9044fbd324f558bd6ef6



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-05  1:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-11  6:20 [PATCH 4/4-V1] AM3517: Enable I2C-GPIO Expander driver support for AM3517EVM hvaibhav
2010-02-05  1:05 ` [APPLIED] [PATCH 4/4-V1] AM3517: Enable I2C-GPIO Expander driver support for Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox