Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757212AbZAGNYv (ORCPT ); Wed, 7 Jan 2009 08:24:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751596AbZAGNYl (ORCPT ); Wed, 7 Jan 2009 08:24:41 -0500 Received: from zone0.gcu-squad.org ([212.85.147.21]:5305 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750991AbZAGNYk (ORCPT ); Wed, 7 Jan 2009 08:24:40 -0500 Date: Wed, 7 Jan 2009 14:24:26 +0100 From: Jean Delvare To: Ed Swierk Cc: linux-i2c@vger.kernel.org, David Brownell , Alessandro Zummo , linux-kernel@vger.kernel.org, Andrew Morton , BARRE Sebastien Subject: Re: [PATCH] rtc-ds1307: True SMBus compatibility Message-ID: <20090107142426.4be04d4d@hyperion.delvare> In-Reply-To: <1231177261.13443.20.camel@localhost.localdomain> References: <1231177261.13443.20.camel@localhost.localdomain> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1627 Lines: 39 Hi Ed, On Mon, 05 Jan 2009 09:41:01 -0800, Ed Swierk wrote: > [Resent to correct linux-i2c address] > > Following up to Sebastien Barre's recent patch, here I go one step > further, replacing i2c block transfers with SMBus byte transfers. Please, no. Adding a compatibility quirk may be acceptable, but forcing everyone to use it instead of the more efficient original code is not fair. > Sticking to pure SMBus makes the driver work on our board, which has an > nVidia SMBus controller driving a DS1339; nforce2 controllers > unfortunately don't support any flavor of i2c block transfer. Are you certain the nForce2 controllers can't do it? The i2c-nforce2 driver doesn't implement it, but this doesn't mean the hardware can't do it. I don't have any datasheet for these chips, but I know their SMBus implementation is very similar to those of the AMD 8111, and i2c-amd8111 has support for I2C block reads and writes. I think it would be worth giving it a try, by copying the i2c-amd8111 implementation into the i2c-nforce2 driver and seeing if it happens to just work. If it works, that would be more elegant than your proposed hack to the rtc-ds1307 driver. > Reading or writing registers repeatedly until they stick is rather > nauseating but I'm aiming for correctness if not elegance. I would > appreciate any suggestions for improvement. See above. -- Jean Delvare -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/