linux-mips
[Top] [All Lists]

Re: [PATCH 8/12] drivers: PMC MSP71xx TWI driver]

To: Marc St-Jean <Marc_St-Jean@pmc-sierra.com>
Subject: Re: [PATCH 8/12] drivers: PMC MSP71xx TWI driver]
From: Jean Delvare <khali@linux-fr.org>
Date: Wed, 21 Mar 2007 16:34:26 +0100
Cc: linux-mips@linux-mips.org, i2c@lm-sensors.org
In-reply-to: <46007F7F.9030604@pmc-sierra.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <46007F7F.9030604@pmc-sierra.com>
Sender: linux-mips-bounce@linux-mips.org
Hi Marc,

On Tue, 20 Mar 2007 16:42:39 -0800, Marc St-Jean wrote:
> Jean Delvare wrote:
> > Why are you making a separate algorithm driver? This should really only
> > be done when the algorithm is very generic. This is the exception, not
> > the rule. These days I tend to move algorithm code back into the only
> > bus driver that uses them (i2c-algo-sibyte done recently, i2c-algo-sgi
> > is next on my list.)
> 
> I believe it was done to separate the algorithm for the TWI sub-system,
> which is used in several devices, from the device family code. If this
> is no longer acceptable I will merge the algo code with the adapter.

You should be able to have a single i2c bus driver handling all the
different devices, by using the platform data to provide the
device-specific configuration. The i2c-algorithm concept is quite old,
now that we have a clean new device driver model it should no longer be
necessary in most cases.

-- 
Jean Delvare

<Prev in Thread] Current Thread [Next in Thread>