Current-Users archive

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

Re: Device name length restriction?



On Mon, Sep 08, 2008 at 01:41:25PM -0700, Paul Goyette wrote:
> BTW, would it be reasonable to add a chip-verification routine to the  
> adt7467 driver?  Currently the driver's match routine blindly returns  
> "1".

Reasonable, sure.  Worth the time, maybe not.

> The adt7463 driver has a "chip verify" routine to check the chip's
> company_id and device_id registers.  The 7467 has similar registers  
> (documented in the data sheet) and hard-coded values.  Since both chips  
> (and possibly other dbCool chips) share the same i2c bus address, it  
> seems to me to be a worthwhile thing to check.

The thing with indirect configuration is that a match function that
fails might have already made damage to a device at the probed address.
There's nothing you can do about that fact, and the way I2C works, the
user pretty much always have to know what is where;  therefore, the
drivers tend to trust the kernel configuration (which is what returning
1 in that context means).

> I've actually written the code to do it, so if someone actually has a  
> machine with an adt7467 I love to have them verify that my verify code  
> actually works.

If it gets tested, it's ok to go in.

-- 
Quentin Garnier - cube%cubidou.net@localhost - cube%NetBSD.org@localhost
"See the look on my face from staying too long in one place
[...] every time the morning breaks I know I'm closer to falling"
KT Tunstall, Saving My Face, Drastic Fantastic, 2007.

Attachment: pgpw6dOvsBFeW.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index