From patchwork Tue Mar 15 19:57:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 597 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:03 -0000 Delivered-To: patches@linaro.org Received: by 10.151.46.5 with SMTP id y5cs80517ybj; Tue, 15 Mar 2011 12:57:30 -0700 (PDT) Received: by 10.227.208.73 with SMTP id gb9mr4813985wbb.194.1300219050171; Tue, 15 Mar 2011 12:57:30 -0700 (PDT) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id x20si329091wbd.10.2011.03.15.12.57.29 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:57:30 -0700 (PDT) Received-SPF: pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=pass (google.com: domain of andy.warmcat.com@googlemail.com designates 74.125.82.50 as permitted sender) smtp.mail=andy.warmcat.com@googlemail.com; dkim=pass (test mode) header.i=@googlemail.com Received: by mail-ww0-f50.google.com with SMTP id 33so1213249wwc.31 for ; Tue, 15 Mar 2011 12:57:29 -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=ku8Jhj0T5veVra6q5pbvBos4aSfFn/n6pLxFcr8lAgNoLFlQQ1Cc2N/cZs8Ca4hVJm BVBZevVEgVdnHub7CpYR8R+3eDfTzZhC1Lc2v6zk8PUlQ08IdJnzcSmBUTngonOeVLPm zEGYscSV73eOQoGkckssOLE3D0nU+1BnKoWxE= 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=aXvKIu7a5rNiNhCELmGpKoywXuil13oSjF0UW+7ECGrA7B4vYBCKe5zMFmX/kKzuMy j3xmx+P4bvzJdXWPU+lTcK33T+xipCmhpKYOWNuOmY/6UHBgZx9idfDr/Rc6EZ7YftAr 92dgBxByKo0bGmpKim2vjN3e9+xH/9sQIAjMY= Received: by 10.216.67.194 with SMTP id j44mr12696240wed.41.1300219049223; Tue, 15 Mar 2011 12:57:29 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id a50sm103943wer.42.2011.03.15.12.57.28 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:57:28 -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-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Ben Dooks , Andy Green Date: Tue, 15 Mar 2011 19:57:27 +0000 Message-ID: <20110315195726.30000.51420.stgit@otae.warmcat.com> In-Reply-To: <20110315195147.30000.86184.stgit@otae.warmcat.com> References: <20110315195147.30000.86184.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