From patchwork Tue Aug 23 05:03:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjugk manjugk X-Patchwork-Id: 1087212 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7N4km2t003722 for ; Tue, 23 Aug 2011 04:47:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752677Ab1HWErn (ORCPT ); Tue, 23 Aug 2011 00:47:43 -0400 Received: from [117.192.64.96] ([117.192.64.96]:40465 "EHLO manju-desktop" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751502Ab1HWErn (ORCPT ); Tue, 23 Aug 2011 00:47:43 -0400 To: devicetree-discuss@lists.ozlabs.org Date: Tue, 23 Aug 2011 10:03:40 +0500 Subject: [RFC/PATCH v2 12/13] dt: omap4: enable dt support for i2c1 controller Envelope-To: devicetree-discuss@lists.ozlabs.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca References: <1314074021-25186-1-git-send-email-manjugk@ti.com> CC: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, grant.likely@secretlab.ca Message-ID: <1314074021-25186-13-git-send-email-manjugk@ti.com> From: "G, Manjunath Kondaiah" Received: from manju-desktop (Citadel from userid 1000) by manju-desktop; Tue, 23 Aug 2011 10:03:44 +0500 X-Mailer: git-send-email 1.7.4.1 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.6 (demeter1.kernel.org [140.211.167.41]); Tue, 23 Aug 2011 04:47:53 +0000 (UTC) Enable dt support for omap4 i2c1 controller and cleanup legacy i2c device registration in omap4 generic board file. Signed-off-by: G, Manjunath Kondaiah --- arch/arm/mach-omap2/board-omap4-dt.c | 21 +++++++++++++++------ 1 files changed, 15 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/board-omap4-dt.c b/arch/arm/mach-omap2/board-omap4-dt.c index a4d296c..9ade238 100644 --- a/arch/arm/mach-omap2/board-omap4-dt.c +++ b/arch/arm/mach-omap2/board-omap4-dt.c @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -31,16 +33,23 @@ static struct twl4030_platform_data omap4_twldata = { .irq_end = TWL6030_IRQ_END, }; -static int __init omap4_i2c_init(void) -{ - omap4_pmic_init("twl6030", &omap4_twldata); - return 0; -} +struct of_dev_auxdata omap4_auxdata_lookup[] __initdata = { + OF_DEV_AUXDATA_ID_PDSIZE("ti,omap-i2c", 0x48070000, "i2c1", 1,\ + &omap4_twldata, sizeof(omap4_twldata)), + {} +}; + +static struct of_device_id omap_dt_match_table[] __initdata = { + { .compatible = "ti,omap4-l4-core", }, + {} +}; static void __init omap4_init(void) { - omap4_i2c_init(); omap_serial_init(); + + of_platform_populate(NULL, omap_dt_match_table, omap4_auxdata_lookup, + NULL); } static void __init omap4_map_io(void)