From patchwork Wed Mar 16 07:19:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 628 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:44:12 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs1284ybj; Wed, 16 Mar 2011 00:19:57 -0700 (PDT) Received: by 10.227.172.7 with SMTP id j7mr438004wbz.60.1300259996769; Wed, 16 Mar 2011 00:19:56 -0700 (PDT) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id r9si1158779wbh.92.2011.03.16.00.19.54 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:19:55 -0700 (PDT) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.42 as permitted sender) client-ip=74.125.82.42; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.42 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by wwk4 with SMTP id 4so3794824wwk.1 for ; Wed, 16 Mar 2011 00:19:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :in-reply-to:references:user-agent:mime-version:content-type :content-transfer-encoding; bh=KRhSmoKzMUmBunIotTnfvFYVmy0N4r6axdrs+5usWMI=; b=l3zbJVIIyAzS4VAdKElG1Dan+c5EpkpnktM7GuB/thTixNzB9gWUQzjMmgFH25xZ3z loAKpPn1Au0p7TaIpjtV2yKWmNPoiG7av/e/E6AgnpM4umAHxZu1HYUbvET6GEn/UTK4 we+FOg0C5p7KB4O3tbKyHHxPt8883E1La+GuQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; b=npVX4ih7R8jyGr+mNclbGH8jQzdhMtk5jw1a+FhZ/3fGUW4JgzEQzfpHWYi4dwKZVT Zt9ofMJy/Syczp/S6YoAV/dbXWvYi7DNANkLwzUKqVtWA/oSnmuRt4MFFt67AkcwYfk+ D86cD9HB6MZRjR+p7LbvfrdNo+nDFxtkwXCPU= Received: by 10.216.11.205 with SMTP id 55mr4455224wex.72.1300259994802; Wed, 16 Mar 2011 00:19:54 -0700 (PDT) Received: from otae.warmcat.com (cpc1-nrte21-2-0-cust677.8-4.cable.virginmedia.com [81.111.78.166]) by mx.google.com with ESMTPS id n4sm367630wee.28.2011.03.16.00.19.53 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Mar 2011 00:19:54 -0700 (PDT) Sender: Andy Green From: Andy Green Subject: [PATCH 3 13/18] I2C: OMAP2+: Pass flags up to omap i2c platform_data as well To: linux-i2c@lists.infradead.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Wed, 16 Mar 2011 07:19:53 +0000 Message-ID: <20110316071953.453.91186.stgit@otae.warmcat.com> In-Reply-To: <20110316071633.453.22228.stgit@otae.warmcat.com> References: <20110316071633.453.22228.stgit@otae.warmcat.com> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 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 --- 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 34a3319..abe070c 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