Subject: Re: NVIDIA nForce2/3/4 SMBus controller
To: KIYOHARA Takashi <kiyohara@kk.iij4u.or.jp>
From: Brett Lymn <blymn@baesystems.com.au>
List: current-users
Date: 07/04/2007 12:08:55
On Tue, Jul 03, 2007 at 04:07:59PM +0900, KIYOHARA Takashi wrote:
>
> I don't understand the meaning of your question. ;-<
>
Well, I may be mistaken here but it appears to me that amdpm and nfsmb
are very very close in what they support. Rather than have a couple
of drivers that deal with chips that are basically the same.
> Which is it nfsmb_softc or nfsmbc_softc? And, the operation of adt7463
> selects nfsmb_softc to which iic(4) is appropriate for instance.
>
In nfsmb_softc - have a set of "operation" function pointers that
define the operations for send/write/receive/read and when the attach
is done populate those pointers with the correct functions (either
amdpm_smbus_* or nfsmb_* functions). Then in the XXX_exec() usec the
ops defines in the sc instead of calling the functions direct, sort of
like what is done in src/sys/dev/ic/nslm7x.c but for a smbus
controller. Does that make sense?
--
Brett Lymn