From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11044 invoked by alias); 10 Nov 2008 10:34:54 -0000 Received: (qmail 10990 invoked by uid 22791); 10 Nov 2008 10:34:53 -0000 X-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from fk-out-0910.google.com (HELO fk-out-0910.google.com) (209.85.128.188) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 10 Nov 2008 10:34:03 +0000 Received: by fk-out-0910.google.com with SMTP id f33so3597846fkf.14 for ; Mon, 10 Nov 2008 02:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=EIcVjk+Y186CzeVfndgEj+lOFSygpTt8k1fYyfqAbf8=; b=bGkUo35zHcuvPnJVXoXQWP/K30ucymc3Jlqyf+ka5o3xhgEo1YOp1QGGFGpCEGZ/8H bsX13no2dYF7dRwjeVeajMON9Ktfk33HyQ3YLeimVKAzFqo8o2lNBi8kEnuGlNGRIt1z ThPs8I+SX8p3Xt3WEKK+ssJGx9lNXBzpljo6s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GWj3z/0uprOpUZFQQtjgT0QA8nNWUj3W4jx3jsTYQKzgfQcf1mzXMXnFymAUTWAmKE 31UcMituXFwr13qJu7ah7BEuImmmnLiCMHmB4Qydk6JkLCExbqW99uwojeV+hVWSYwwC J3TSRwUoScLIEFdOfTdHUQ+TQRPjaX07g9r6M= Received: by 10.181.224.6 with SMTP id b6mr2039113bkr.187.1226313240624; Mon, 10 Nov 2008 02:34:00 -0800 (PST) Received: by 10.181.196.5 with HTTP; Mon, 10 Nov 2008 02:34:00 -0800 (PST) Message-ID: Date: Mon, 10 Nov 2008 10:34:00 -0000 From: "Tom Deconinck" To: ecos-devel@ecos.sourceware.org Subject: Re: i2c driver for at91sam7x In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1226070563.4223.2.camel@localhost.localdomain> <20081107161442.GS20110@lunn.ch> X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2008-11/txt/msg00017.txt.bz2 On Fri, Nov 7, 2008 at 5:14 PM, Andrew Lunn wrote: > > On Fri, Nov 07, 2008 at 08:39:23PM +0530, vibisreenivasan wrote: > > hello, > > Is there any one working on i2c bus driver for at91sam7x. > > I know eCosCentric have one, but you need to pay for that. > > Other people have mentioned writing i2c drivers as well. > > However, you need to be careful. The i2c hardware is broken. The Linux > kernel marks it as such. See: > > http://www.at91.com/samphpbb/viewtopic.php?t=4665&sid=1032a7cdc95b571dc784adb204d78d33 > > From what i understand, if you are doing transfers of 1 byte, it is > O.K, but multiple byte transfers can break. > > Writing a GPIO based driver should be reasonably easy as far as i > understand and does not suffer from these problems. > > Andrew I have written such a driver some time ago, but I changed jobs since, so I don't have access to the source anymore. My experience: use GPIO and the eCos bit-banging interface, since the hardware implementation is seriously broken. The driver I wrote didn't work well using interrupts (latency problems combined with a 'smart' hardware implementation that decides to generate stop-conditions by itself, breaking multy-byte transfers, etc.) It did work in polling mode. Tom