SuperIO driver redesign.

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

 



I'm pleased to announce the new design of the SuperIO driver for linux
kernel 2.6.
It has grown a bit complex but thus very flexible.

Main goal was to be able co link any registered SuperIO chip with any
number of registered logical devices. Next step is to add ability to
communicate with SuperIO subsystem from userspace.
External kerne modules may access to logical devices using
sc_{get,put}_ldev() and in similar way to SuperIO chip drivers -
sc_{get,put}_sdev().

Driver writers shoud use sc_{add,del}_logical_dev() and
sc_{add,del}_sc_dev() to accordingly add/remove logical devices and
SuperIO chip drivers.

Any SuperIO chip driver must provite at least 2 functions:
->probe() and ->activate_one().
The former is called with different HW addresses and should return 0 if
device was found there or negative error value.
The latter is called each time new logical device being added with
pointer to it's logical device structure. It should return 0 if logical
device was found to be active or negative error value.

Any logocal device must provide 4 functions:
->activate() - it is used to activate logical device.
->read()/write() - what do you think, it is used to read and write
from/to logical device registers.
->control() - it is used to control access to logical device. Actually
it is private combination of ->read()/write() functions but is providede
for convenience.

Now it is only tested with SuperIO chip PC87366 and GPIO logical device.
Next step is to port existing SC1100 driverto the new schema.

Please review and comment.

P.S. It is provided as files and will be posted as patches after all
technical problems resolved.

Thank you.

P.S. kinda mega picture with design draft can be found at
http://tservice.net.ru/~s0mbre/?section=gallery&item=superio_design

-- 
	Evgeniy Polyakov ( s0mbre )

Crash is better than data corruption. -- Art Grabowski
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chain.c
Type: text/x-csrc
Size: 1424 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chain.h
Type: text/x-chdr
Size: 1074 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile
Type: text/x-makefile
Size: 342 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0002.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc8736x.c
Type: text/x-csrc
Size: 4447 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0003.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pc8736x.h
Type: text/x-chdr
Size: 1866 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0004.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc.c
Type: text/x-csrc
Size: 9912 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0005.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc_gpio.c
Type: text/x-csrc
Size: 4835 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0006.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc_gpio.h
Type: text/x-chdr
Size: 1579 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0007.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sc.h
Type: text/x-chdr
Size: 2378 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0008.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20040827/5a39ca36/attachment-0009.bin 


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

  Powered by Linux