How the lm-sensors communicate with the device driver

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

 



Hi All,
 
I wrote a MCP3021's driver using the new I2C device model under Linux
2.6.26.
The chip MCP3021 is connected to Freescale's I2C controller.
Now it works well, the following is the log info:
 
-sh-2.05b# ls /sys/bus/i2c/drivers/mcp3021/
0-004d  1-004d  bind  module  uevent  unbind
-sh-2.05b#
 
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/name
mcp3021
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/in0_input
213
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/in0_max
213
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/in0_min
192 
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/curr1_input
960
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/curr1_max
1065
-sh-2.05b# cat /sys/bus/i2c/drivers/mcp3021/0-004d/curr1_min
945
 
-sh-2.05b# sensors
mcp3021-i2c-0-4d

Adapter: MPC adapter
in0:         +0.21 V  (min =  +0.19 V, max =  +0.22 V)
 
mcp3021-i2c-1-4d
Adapter: MPC adapter
in0:         +0.41 V  (min =  +0.41 V, max =  +0.41 V)

Q:
1. How the lm-sensors communicate with the device driver? 
2. How the lm-sensors get the attribute info?
2. Why the current info, i.e. curr1_x, doesn't list ?
 
Thanks,
Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20081021/c15b642c/attachment.html 


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

  Powered by Linux