Subject: Re: lm(4) driver sync with OpenBSD, supporting new chips.
To: Juan RP <juan@xtrarom.org>
From: Andrew Doran <ad@netbsd.org>
List: tech-kern
Date: 03/07/2007 16:14:28
Hi,

> Hi, I just updated our lm(4) driver with the OpenBSD code (which is IMHO
> much cleaner and simplified) and that gives us much more accurate
> reported values and support for new chips.

Cool!

> If you are using the lm(4) driver, could you please test the patch?
>
> The list of supported chipsets is:
>
> 	* National Semiconductor LM78/LM78J/LM79/LM81.
> 	* Winbond: W83627HF, W83627THF, W83627EHF, W83627DHG,
> 			     W83637HF, W83697HF, W83781D, W83782D,
> 			     W83783S, W83791D, W83791SD, W83792D.
> 	* Asus AS9912F.
>
> http://www.xtrarom.org/patches/nslm7x.diff

-int
-lm_generic_banksel(lmsc, bank)
-	struct lm_softc *lmsc;
-	int bank;

I seperated bank selection out in the lm driver quite a while ago because
there are SMBus/I2C chips (WinBond I think?) that have 3 addresses. The
first has the usual registers plus bank 0, and the other two addresses are
for access to bank 1 and 2. I'm not sure whether it's still useful, but if
not a big deal it's probably worthwhile preserving.

Cheers,
Andrew