[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Device name length restriction?
-----BEGIN PGP SIGNED MESSAGE-----
On Sep 8, 2008, at 5:42 PM, Paul Goyette wrote:
On Mon, 8 Sep 2008, Michael Lorenz wrote:
On Sep 8, 2008, at 4:41 PM, 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".
That's because it's main use is on macppc where it attaches as
adt7467c at ki2c, the attachment to iic has never been well tested.
For ki2c we don't need to specify an address since we can get it from
OpenFirmware's device tree.
A verify function should be easy - the chip has three registers which
return a device ID of some sort.
Well, I found two, the company_id and device_id registers; this is
analgous (no pun intended!) to what is done in Analog's adt7463.
Maybe my memory's fading ;)
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.
Feel free to fix it.
Done! See attached diffs. While I was at it, I also added a URL
reference to the datasheet. Unless/until we get a NetBSD datasheet
library to store all these in, I figured a pointer was the next
best thing to do.
I think there's a collection of datasheets somewhere on ftp.netbsd.org
Also, the chip supports more fans than the driver currently reports,
mainly because in iBooks only one fan is wired up - you may want to
fix that too.
Ah, OK, I'll check into that, too. Of course, we'll probably end
up with another situation where we can't tell if a fan is broken or
just not wired - see yesterday's discussion regarding ipmi. :)
That's why I only implemented support for one fan. We may want a
config option for that? Or use device properties to pass information
to the driver if we somehow know which fans are wired ( like in the
iBook case ).
I have one in my iBook G4 but no NetBSD on it since its disk died and
the only replacement I had at hand was a 6GB Toshiba, barely enough
for MacOS X. I'd like to hear from someone with an adt7467 in
something that's not a Mac and maybe uses more than fan input.
Yeah, I'd like to hear from them, too. I'm not going to commit the
attached diffs until someone actually tries them out and reports
success. I'll just keep them around in my home tree for now.
Sounds reasonable since the driver's only used on macppc as far as I
know where this is a non-issue anyway.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
-----END PGP SIGNATURE-----
Main Index |
Thread Index |