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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux