PRJ001: TI TMP401 driver "complete"
Hans de Goede
j.w.r.degoede at hhs.nl
Sun Oct 28 10:01:01 UTC 2007
I've thrown a couple of spare hours at writing a driver for the TI TMP401 as
I've attached the complete, but untested (no access to hardware) resulting driver.
Since I never got an answer to the following two questions:
1) does powerconsumption matter a lot (iow battery powered?
2) do the alert and therm pins need to be configured or is this done by
I've made this a bog standard hwmon driver, so the device is put in autorun
mode (the power on reset default) and the pin configuration is left untouched.
I will gladly add support for configuring the pins and using one-shot mode to
the driver if requested.
Notice that when compiling against anything older then 2.6.24-rc1, you will get
the following 2 (harmless) warnings:
CC [M] /home/hans/projects/ti-tmp401/tmp401.o
/home/hans/projects/ti-tmp401/tmp401.c: In function ‘tmp401_detect’:
/home/hans/projects/ti-tmp401/tmp401.c:417: warning: assignment from
incompatible pointer type
/home/hans/projects/ti-tmp401/tmp401.c: In function ‘tmp401_detach_client’:
/home/hans/projects/ti-tmp401/tmp401.c:473: warning: passing argument 1 of
‘hwmon_device_unregister’ from incompatible pointer type
Also when using some kernel releases back (don't remember exactly when this
happened). The used mutex most be changed to an good old semaphore intialized
as a mutex. I can provide a modified version with the necessary changes on request.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15394 bytes
Desc: not available
More information about the devel