From patchwork Sat Feb 13 11:47:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 79181 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o1DBm8DK027281 for ; Sat, 13 Feb 2010 11:48:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754038Ab0BMLsJ (ORCPT ); Sat, 13 Feb 2010 06:48:09 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:47238 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753986Ab0BMLsG (ORCPT ); Sat, 13 Feb 2010 06:48:06 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o1DBm0io023845 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Feb 2010 05:48:02 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o1DBlvAi012604; Sat, 13 Feb 2010 17:17:59 +0530 (IST) From: hvaibhav@ti.com To: linux-omap@vger.kernel.org Cc: tony@atomide.com, Vaibhav Hiremath Subject: [PATCH 2/2-V3] AM3517: Enable I2C-GPIO Expander driver support for AM3517EVM Date: Sat, 13 Feb 2010 17:17:57 +0530 Message-Id: <1266061677-12681-3-git-send-email-hvaibhav@ti.com> X-Mailer: git-send-email 1.6.2.4 In-Reply-To: References: Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 13 Feb 2010 11:48:12 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 9589e46..757dbcf 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -208,11 +209,46 @@ static void __init am3517_evm_rtc_init(void) am3517evm_i2c_boardinfo[0].irq = gpio_to_irq(GPIO_RTCS35390A_IRQ); } +/* + * 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; }