From patchwork Tue Mar 15 19:57:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 637061 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 p2FJvsgb007498 for ; Tue, 15 Mar 2011 19:57:54 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757283Ab1COT5x (ORCPT ); Tue, 15 Mar 2011 15:57:53 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:64279 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755491Ab1COT5w (ORCPT ); Tue, 15 Mar 2011 15:57:52 -0400 Received: by mail-ww0-f44.google.com with SMTP id 36so1208159wwa.1 for ; Tue, 15 Mar 2011 12:57:52 -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=+dbGG4H2B4oC/dyQeCxRWBwW/KHbAYDnH6nR9+HuE8s=; b=K/CfaSWYXu3XY4zCnZ178O+3iJ3hGPpjfbKaV/pE4IeU6+UVr9mziDvnvwJu2eyLkJ WCOCIxhstWYy6Hzg2+KqmAQsnrf7MHw8yTCh1VfWYmQmTK/rKwypQI7uERQOfVm1BCFV ZwYPjfgRLo8Fugh45giTQLv7/GLPp+XnC1X40= 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=eGrKjVfdQgI2OehDywtNHyKjzAVn+phX8r4/2SjEyhWgoSp6AIci/4CtZOPDzYdnog Hj40humQLISgfZoCcZv7pj8CWUklQYGcJu5Tr7k0M4vrHqNATUtsMQYtAPOMQR7WOlC5 gZww/Pila4YIPHxTPg1bjzmZH/oKGuGLGSqCo= Received: by 10.227.162.77 with SMTP id u13mr1888172wbx.187.1300219071973; Tue, 15 Mar 2011 12:57:51 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id f30sm113388wef.7.2011.03.15.12.57.50 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:57:51 -0700 (PDT) From: Andy Green Subject: [PATCH 3 16/18] I2C: OMAP1: set i2c unit feature implementation flags in platform data 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:49 +0000 Message-ID: <20110315195749.30000.36662.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 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, 15 Mar 2011 19:57:54 +0000 (UTC) diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index abe070c..710c5d5 100644 --- a/arch/arm/plat-omap/i2c.c +++ b/arch/arm/plat-omap/i2c.c @@ -111,6 +111,19 @@ static inline int omap1_i2c_add_bus(int bus_id) /* all OMAP1 have IP version 1 register set */ pdata->rev = OMAP_I2C_IP_VERSION_1; + /* all OMAP1 I2C are implemented like this */ + pdata->flags = OMAP_I2C_FLAG_NO_FIFO | + OMAP_I2C_FLAG_SIMPLE_CLOCK | + OMAP_I2C_FLAG_16BIT_DATA_REG | + OMAP_I2C_FLAG_ALWAYS_ARMXOR_CLK; + + /* how the cpu bus is wired up differs for 7xx only */ + + if (cpu_is_omap7xx()) + pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_1; + else + pdata->flags |= OMAP_I2C_FLAG_BUS_SHIFT_2; + return platform_device_register(pdev); }