From patchwork Tue Mar 15 19:56:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 636931 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 p2FJuF7c006542 for ; Tue, 15 Mar 2011 19:56:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753586Ab1COT4O (ORCPT ); Tue, 15 Mar 2011 15:56:14 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:62524 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751986Ab1COT4N (ORCPT ); Tue, 15 Mar 2011 15:56:13 -0400 Received: by mail-wy0-f174.google.com with SMTP id 21so915512wya.19 for ; Tue, 15 Mar 2011 12:56:13 -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=clvqktnitUEibLjgRCYqwVFOp0Z8jXgHIqdUhGYl6Es=; b=WXcbpqmr/6QSIjgSU5dVJp0RLIM4XPOIGst+8Hs8p1QV3nSbgpJM8xsGR+e0J3p/vu /q0w6+EDPNjb5lG157ezyB/WG0cW3FOhiNaylNGnUPYnO/kWt4MWX+NkV9LhO3UbNH3t RjcKVjLjLejAovYno3A9bX8ntOxoumMZ923Pw= 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=cU2HYOG2QOVcGHN9O68LBO5ETnD0emn+wqxpJ4v30nUAiABImOocM8reDiLxvJJtum e7YAI2NLzkiGhJ3TdZ0aBk2APQOyfgYDGmpyCzVd3Plu19fAkPP8NJeNDCgDqEhdgfee E68DGTFW156cXCvItVoJkgTLhI8zhSptJ07Xk= Received: by 10.227.162.77 with SMTP id u13mr1886461wbx.187.1300218973228; Tue, 15 Mar 2011 12:56:13 -0700 (PDT) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id t11sm103702wes.41.2011.03.15.12.56.12 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 15 Mar 2011 12:56:12 -0700 (PDT) From: Andy Green Subject: [PATCH 3 03/18] I2C: OMAP2+: Introduce I2C IP versioning constants 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:56:10 +0000 Message-ID: <20110315195610.30000.4573.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:56:15 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/i2c.h b/arch/arm/plat-omap/include/plat/i2c.h index 878d632..a1d3d06 100644 --- a/arch/arm/plat-omap/include/plat/i2c.h +++ b/arch/arm/plat-omap/include/plat/i2c.h @@ -22,6 +22,7 @@ #define __ASM__ARCH_OMAP_I2C_H #include +#include #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) extern int omap_register_i2c_bus(int bus_id, u32 clkrate, diff --git a/include/linux/i2c-omap.h b/include/linux/i2c-omap.h index 7472449..701886d 100644 --- a/include/linux/i2c-omap.h +++ b/include/linux/i2c-omap.h @@ -3,6 +3,18 @@ #include +/* + * Version 2 of the I2C peripheral unit has a different register + * layout and extra registers. The ID register in the V2 peripheral + * unit on the OMAP4430 reports the same ID as the V1 peripheral + * unit on the OMAP3530, so we must inform the driver which IP + * version we know it is running on from platform / cpu-specific + * code using these constants in the hwmod class definition. + */ + +#define OMAP_I2C_IP_VERSION_1 1 +#define OMAP_I2C_IP_VERSION_2 2 + struct omap_i2c_bus_platform_data { u32 clkrate; void (*set_mpu_wkup_lat)(struct device *dev, long set);