NCLV-D SMBus - proposal to a solution

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

 



Rudolf Marek wrote:
> Hello,

> 
> 2) Some kind of multiplexing bus driver that will allow us to "see" both of
> memory EEPROMs and monitoring chip.


> 
> Ad 2)
> Thank you for information there are very helpful. We agreed with Jean that most
> clean solution to a problem would be a "multiplexing bus driver" (users can use
> until this is done the isaset trick). As you might noticed the multiplexer just
> switches the intel SMBus host between four busses. We are interrested in bus 0
> and bus 1. One is with SPD EEPROMs and second contain 792 chip. We have already
> similar driver in kernel for this that is called i2c-amd756-s4882.c.
> 
> Your driver will be very similar except that the multiplexer itself is not
> on the smbus but you need to do same trick as with isaset command. Generally
> you would need to register the PCI device to your multiplexing driver, get the
> GPIO base addr (same as my hide and seek patch) and switch it to 0x0 or 0x08
> when you have request from bus 0 or bus 1...
> 
> How is the multiplexed bus concept working:
> 
> It creates more busses from i2c core point of view. When there is some request
> to read or write from a driver it will go to this virtual bus driver,
> this driver will switch the bus and call the original driver. So it just create
> handlers for "xfer" function that is the transmission function.
> 
> When it is done you will have more virtual busses.
> 
> modprobe i2c-i801
> modprobe your multiplex driver
> 
> so if you will do
> i2cdetect 0
> It will switch the multiplexer and you will see only SPD eeproms here
> if you will do:
> i2cdetect 1
> You will see addresses with 792 chip.
> 
> Later you just modprobe eeprom and modprobe w83792 and all will work as expected
> . You will see in sensors command both eeproms and chip data.
> 
> The existing driver has 200 lines and I guess yours would have like 300 so it is
> not so difficult to write it. Unfortunalely I'm quite busy these days and Jean
> has a lot of work too so I cant write it for you but of course I will help you.
> 

This is a good time to bring up the i2c-virtual driver as an alternative to the -s4882.c
style of multiplexing driver. I believe this is a cleaner and more general approach to
bus multiplexing.

The i2c-virtual driver is checked in to sensors but the small changes required to i2c-core.c
are not checked in. I held off late last year because 2.9.0 was coming out soon.
Now that 2.9.1 is out it's  time to look at it again.
I have to rework the i2c-core changes because they conflicted with
other recent changes to i2c-core.

attached are the proposed changes to i2c-core for comment.

mds
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: i2c-core.diff
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050418/ba23a5a0/attachment.pl 


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

  Powered by Linux