linux-mips
[Top] [All Lists]

Re: [PATCH 9/12] drivers: PMC MSP71xx LED driver

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

On Tue, 20 Mar 2007 16:49:50 -0800, Marc St-Jean wrote:
> Jean Delvare wrote:
> > This is confusing. First you write a dedicated driver, then you use the
> > generic name for the device name. This raises a question:
> > 
> > Would it make sense to have generic PCA9554 driver, possibly
> > implementing the new GPIO infrastructure, and have dedicated drivers
> > such as this one build on top of that?
> > 
> > Either way you have to be consistent, if you go with dedicated code,
> > the i2c client name should not be generic.
> 
> I have renamed the driver "pmctwiled" and the client "pmctwiled_pca9554"
> to help avoid confusion.

Are there PMC LED implementations _not_ based on the PCA9554? If not,
then the _pca9554 suffix is not really needed.

> > This driver appears to be a good candidate to become a new-style i2c
> > driver, where devices are instantiated explicitely by the platform code
> > rather than probed for afterwards. The i2c-core changes allowing that
> > will be in the next -mm kernel and will be merged in 2.6.22-rc1.
> 
> OK, I will look at it when it reaches l-m.o. Although the probe still
> allows us to support several demo boards on the same device family
> which could have a different number of clients.

The new code will let you handle that case too, the difference with the
current model being that instead of doing a system-wide probe and
having your driver check that you only attach to the right i2c adapter,
you will specifically ask to probe only that adapter, so the check will
no longer be necessary. And of course it'll be faster, too.

-- 
Jean Delvare

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