Re: [PATCH] hwmon/mc13xxx-adc: add support for the MC13892 PMIC

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

 



On Mon, 26 Sep 2011 18:08:39 +0200
Jean Delvare <khali@xxxxxxxxxxxx> wrote:

> On Mon, 26 Sep 2011 17:54:47 +0200, Uwe Kleine-König wrote:
> > Hello Guenter,
> > 
> > > renaming the file makes it technically impossible to review the changes.
> > oh, I forgot to add -M to format-patch. I can resend when we agree on
> > renaming or not. But note that even then there are many hunks as I did
> > s/mc13783/mc13xxx/ in the driver.
> 
> Please don't do that, it's pointless. Naming drivers and functions
> after the first supported device is a very common practice.
> 
> > > Please refrain from it, and use the mechanism used for other hwmon
> > > drivers - add support for the new chip to the old driver, and reference
> > > the supported chips in Kconfig and the driver documentation.
> > Ah, I missed to rename Documentation/hwmon/mc13783-adc. Will update that
> > on v2.
> > 
> > > Besides, the new name implies that all future MC13XXX chips would be
> > > supported by this driver, which seems to be a bit difficult to predict.
> > hmm, but today mc13xxx is the best name we have. And I prefer a driver
> > named mc13xxx over mc13783 because when looking for a driver for the
> > mc13892 and seeing only mc13783-adc I'd assume it doesn't support
> > mc13892. OTOH if there is a mc13xxx-adc driver I'd look in more detail
> 
> That's simply a wrong assumption from you.
> 
> > if my chip is supported.
> 
> With name mc13xxx-adc you'd have to check the details just the same, as
> you have no guarantee that the xxx's match the chip you have.

Yes, but from the filename you'd already have a hint. If you only know mc13892
and don't know that the mc13783 is an almost compatible part, you'd never find
the former was already supported.
OTOH, I know that many other drivers tend to have names reflecting the first
supported model of a family, so that is usual practice.
Personally I prefer the way of minimum impact, so I'd suggest the latter
solution to keep the name of the file and functions. For the MFD driver it is
a different story, since that driver contains code that is generic (mc13xxx)
and code that is specific to one or the other model (mc13892 or mc13783), so
the mc13xxx naming makes sense there to point out the differences.

Best regards,

-- 
David Jander
Protonic Holland.

_______________________________________________
lm-sensors mailing list
lm-sensors@xxxxxxxxxxxxxx
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux