From patchwork Tue Mar 8 11:09:19 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 617991 X-Patchwork-Delegate: tony@atomide.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 p28B9QF9027104 for ; Tue, 8 Mar 2011 11:09:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754160Ab1CHLJX (ORCPT ); Tue, 8 Mar 2011 06:09:23 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:52226 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753902Ab1CHLJW (ORCPT ); Tue, 8 Mar 2011 06:09:22 -0500 Received: by mail-ww0-f44.google.com with SMTP id 36so951436wwa.1 for ; Tue, 08 Mar 2011 03:09:22 -0800 (PST) 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=pmNyTCiHE59qo+i5C1Q2PmTBPLtCufxlTkPhK706WY8=; b=uzxFfYX5Gqjeyhh1/BimSPJqAFWahHEoOj0Fv6aTkKtPItdvQNg1MVqb2wo75rqugj 8gVwrUPIOktZMPrqlHXikYCfMFnOk4HZU1JoX6FagXHPJGo3cKncCwCicHV0e3ultCp5 PlygkmVQll8TUCl+P0jYnat1x5+YFKPqNwUeM= 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=YBBZErcL0TAOkip0CDYjb+eD6neBnygGrvpA7dbNtQVXTj++2/cYnIL8pPGCiWYcuP tuMD+bj0IZELBW8XQnWVXEdbYG/eOUL2W41+6nX1MI0JLo6xtCSQ6zr7WxtARRNOkBl3 Six9JNTDBarBkWN5xQ0RiLoimBFBuT8x4Hgzk= Received: by 10.227.200.138 with SMTP id ew10mr4421357wbb.21.1299582561929; Tue, 08 Mar 2011 03:09:21 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id w25sm477551wbd.17.2011.03.08.03.09.20 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 08 Mar 2011 03:09:21 -0800 (PST) From: Andy Green Subject: [PATCH 2 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, 08 Mar 2011 11:09:19 +0000 Message-ID: <20110308110919.23531.58653.stgit@otae.warmcat.com> In-Reply-To: <20110308105934.23531.83540.stgit@otae.warmcat.com> References: <20110308105934.23531.83540.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, 08 Mar 2011 11:09:26 +0000 (UTC) diff --git a/arch/arm/plat-omap/i2c.c b/arch/arm/plat-omap/i2c.c index 9098669..2388b8e 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); }