From patchwork Thu Jun 2 00:19:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 842222 X-Patchwork-Delegate: khilman@deeprootsystems.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p520KW1T020785 for ; Thu, 2 Jun 2011 00:20:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759272Ab1FBAUN (ORCPT ); Wed, 1 Jun 2011 20:20:13 -0400 Received: from na3sys009aog115.obsmtp.com ([74.125.149.238]:53828 "EHLO na3sys009aog115.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759246Ab1FBAUK (ORCPT ); Wed, 1 Jun 2011 20:20:10 -0400 Received: from mail-pw0-f49.google.com ([209.85.160.49]) (using TLSv1) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKTebXOYpn6I7f2wZA34r3uML5+pCMhDf9@postini.com; Wed, 01 Jun 2011 17:20:10 PDT Received: by mail-pw0-f49.google.com with SMTP id 8so334601pwi.22 for ; Wed, 01 Jun 2011 17:20:09 -0700 (PDT) Received: by 10.68.57.241 with SMTP id l17mr44867pbq.85.1306974009787; Wed, 01 Jun 2011 17:20:09 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net [24.19.7.36]) by mx.google.com with ESMTPS id f3sm76478pbj.0.2011.06.01.17.20.08 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 01 Jun 2011 17:20:09 -0700 (PDT) From: Kevin Hilman To: Ben Dooks , linux-i2c@vger.kernel.org Cc: Andy Green , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v4 13/18] I2C: OMAP2+: Pass flags up to omap i2c platform_data as well Date: Wed, 1 Jun 2011 17:19:39 -0700 Message-Id: <1306973984-15165-14-git-send-email-khilman@ti.com> X-Mailer: git-send-email 1.7.4 In-Reply-To: <1306973984-15165-1-git-send-email-khilman@ti.com> References: <1306973984-15165-1-git-send-email-khilman@ti.com> 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]); Thu, 02 Jun 2011 00:20:33 +0000 (UTC) From: Andy Green This is how the driver can find the flags for its implementation functionality in its platform_data Cc: patches@linaro.org Cc: Ben Dooks Reported-by: Peter Maydell Signed-off-by: Andy Green Signed-off-by: Tony Lindgren Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/i2c.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 0d3eda7..9098669 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -141,6 +141,7 @@ static inline int omap2_i2c_add_bus(int bus_id) struct omap_device *od; char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN]; struct omap_i2c_bus_platform_data *pdata; + struct omap_i2c_dev_attr *dev_attr; omap2_i2c_mux_pins(bus_id); @@ -156,10 +157,14 @@ static inline int omap2_i2c_add_bus(int bus_id) pdata = &i2c_pdata[bus_id - 1]; /* * pass the hwmod class's CPU-specific knowledge of I2C IP revision in - * use up to the OMAP I2C driver via platform data + * use, and functionality implementation flags, up to the OMAP I2C + * driver via platform data */ pdata->rev = oh->class->rev; + dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; + pdata->flags = dev_attr->flags; + /* * When waiting for completion of a i2c transfer, we need to * set a wake up latency constraint for the MPU. This is to