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.