From patchwork Thu Mar 3 13:50:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Green X-Patchwork-Id: 606111 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 p23DpwHx008145 for ; Thu, 3 Mar 2011 13:52:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757909Ab1CCNuh (ORCPT ); Thu, 3 Mar 2011 08:50:37 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:45581 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753982Ab1CCNug (ORCPT ); Thu, 3 Mar 2011 08:50:36 -0500 Received: by mail-wy0-f174.google.com with SMTP id 36so1045897wyg.19 for ; Thu, 03 Mar 2011 05:50:35 -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=0So+t4QeKSXk94OCJTsdEeZgOBNfYZuNel8I9YGM/60=; b=j0djTdzwNHJQDhoIwgfvaxKNXsSINKDH6m76b7Qv4EUxpP6kjHW03flZ/b0URprt82 I7rtBa9Ru1TbFpCuTGcjkoq100xnuIjYsbvbwlvGQpbqm/JZwaZ/czOhRNFdzThbF9jF S2mTOZKWWIGYRiypFEThP268RM6GdDPkXt/to= 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=WbNJLo3gqKwaBU/V7WxCpifCbHrcCZyw5OUqpdNf8cKVhvyDBLcYMLOigTkmBITZCl ZLtO9UdFq7TF68c3rf9TIh8SbsnVeVZHErWbKi0nZS2H/QyBLc39PVWIsuKMwz+nMITR f+vm6otLlgT9+Lxn2VYlLYQ3apNYiq4YdfMlk= Received: by 10.216.178.138 with SMTP id f10mr846224wem.98.1299160232251; Thu, 03 Mar 2011 05:50:32 -0800 (PST) Received: from otae.warmcat.com (s15404224.onlinehome-server.info [87.106.134.80]) by mx.google.com with ESMTPS id h39sm585286wes.29.2011.03.03.05.50.31 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2011 05:50:31 -0800 (PST) From: Andy Green Subject: [PATCH 2/4] OMAP3 I2C document why cpu type and not peripheral unit ID used to probe To: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Cc: patches@linaro.org, Andy Green Date: Thu, 03 Mar 2011 13:50:30 +0000 Message-ID: <20110303135030.30648.14923.stgit@otae.warmcat.com> In-Reply-To: <20110303134744.30648.91218.stgit@otae.warmcat.com> References: <20110303134744.30648.91218.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]); Thu, 03 Mar 2011 13:52:00 +0000 (UTC) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index b605ff3..d6500ec 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1032,6 +1032,17 @@ omap_i2c_probe(struct platform_device *pdev) else dev->reg_shift = 2; + dev->regs = (u8 *)reg_map; + + /* + * this is a bit tricky, implementation on 4430 has the active + * part of its ID register moved to +4 instead of +0 as + * previously. So, we can't probe just using the ID register + * Complicating matters the older implementation using the + * simpler register set on 3530 also reports its revision as + * 0x40, same as the 4430 newer implementation. + */ + if (cpu_is_omap44xx()) dev->regs = (u8 *) omap4_reg_map; else