PRJ001: TI TMP401 driver "complete"

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

 



Hi All,

I've thrown a couple of spare hours at writing a driver for the TI TMP401 as 
promised.

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
    the bootloader?

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.

Regards,

Hans
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tmp401.c
Type: text/x-csrc
Size: 15394 bytes
Desc: not available
Url : http://driverdev.linuxdriverproject.org/pipermail/devel/attachments/20071028/3ffb3482/attachment.c 


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux