[ patch 1/4 RFC for 2.6.23-rc0 ] add superio-locks to drivers/hwmon/

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

 



01 - adds superio_locks -

drivers needing superio access register, and get a 'slot' with port-id
info and a mutex,multiple drivers share the same 'slot', and coordinate 
access with its mutex.

   superio_find() - finds and reserves the slot, returned as ptr or null
   superio_release()  - relinguishes the slot (ref-counted)

Once theyve got the reservation in struct superio * gate (as done in
patches 2,3,4) they *may* use

     superio_lock(gate)
     superio_inb(gate, addr),
     superio_outb(gate, addr, val)



Signed-off-by:  Jim Cromie <jim.cromie at gmail.com>

---

[jimc at harpo mylocks]$ diffstat diff.locks-superio
  drivers/hwmon/Kconfig         |   10 ++
  drivers/hwmon/Makefile        |    1
  drivers/hwmon/superio_locks.c |  210 
++++++++++++++++++++++++++++++++++++++++++
  include/linux/superio-locks.h |   71 ++++++++++++++
  4 files changed, 292 insertions(+)
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.locks-superio
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070614/28a7938c/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