public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* How the lm-sensors communicate with the device driver
@ 2008-10-21 10:31 Hu Mingkai-B21284
       [not found] ` <CF6163088BDE8747873ADAA4AF922BF258D527-6lxYB4K41cniD3AT8lUqWFjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hu Mingkai-B21284 @ 2008-10-21 10:31 UTC (permalink / raw)
  To: i2c-GZX6beZjE8VD60Wz+7aTrA


[-- Attachment #1.1: Type: text/plain, Size: 1191 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 4423 bytes --]

[-- Attachment #2: Type: text/plain, Size: 157 bytes --]

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How the lm-sensors communicate with the device driver
       [not found] ` <CF6163088BDE8747873ADAA4AF922BF258D527-6lxYB4K41cniD3AT8lUqWFjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
@ 2008-10-21 11:14   ` Jean Delvare
  0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2008-10-21 11:14 UTC (permalink / raw)
  To: Hu Mingkai-B21284; +Cc: i2c-GZX6beZjE8VD60Wz+7aTrA

Hi Vincent,

On Tue, 21 Oct 2008 18:31:07 +0800, Hu Mingkai-B21284 wrote:
> 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 ?

Wrong mailing list. Questions about lm-sensors go to the lm-sensors
mailing list:
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

-- 
Jean Delvare

_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-21 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21 10:31 How the lm-sensors communicate with the device driver Hu Mingkai-B21284
     [not found] ` <CF6163088BDE8747873ADAA4AF922BF258D527-6lxYB4K41cniD3AT8lUqWFjVikpgYyvb5NbjCUgZEJk@public.gmane.org>
2008-10-21 11:14   ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox