# udev not seeing i2c device

## mjbjr

I've got lm_sensors working and it sees my mobo's i2c, and 'sensors' shows me the temps,

and 'gkrellm2' shows me the data...

but

'sensors-detect' (and other sensor utils) doesn't see a device on which to report.

I can see the sensor data here:

 /sys/bus/i2c/devices/0-002d/

and more here:

/sys/class/i2c-adapter/i2c-0/

In the above dir's and their sub-dirs there is no 'class' for something like a

'udevinfo -a -p /sys/bus/i2c/devices/0-002d/' to show me vendor, model, etc., etc.

info on which you would hang a udev rule.

what it does show:

  looking at class device '/sys/bus/i2c/devices/0-002d':

    SUBSYSTEM="unknown"                                          <<<<< notice this...  hmmm  it doesn't get i2c

    SYSFS{alarms}="0"

    SYSFS{cpu0_vid}="1525"

    SYSFS{detach_state}="0"

    SYSFS{fan1_div}="2"

    SYSFS{fan1_input}="3000"

    SYSFS{fan1_min}="3443"

    SYSFS{fan2_div}="8"

    SYSFS{fan2_input}="0"

    SYSFS{fan2_min}="807"

    SYSFS{fan3_div}="8"

    SYSFS{fan3_input}="0"

    SYSFS{fan3_min}="-1"

    SYSFS{in0_input}="1600"

    SYSFS{in0_max}="1808"

    SYSFS{in0_min}="1200"

    SYSFS{in1_input}="1552"

    SYSFS{in1_max}="1808"

    SYSFS{in1_min}="1200"

    SYSFS{in2_input}="3312"

    SYSFS{in2_max}="3632"

    SYSFS{in2_min}="2960"

    SYSFS{in3_input}="2976"

    SYSFS{in3_max}="3280"

    SYSFS{in3_min}="2672"

    SYSFS{in4_input}="3024"

    SYSFS{in4_max}="3792"

    SYSFS{in4_min}="2512"

    SYSFS{in5_input}="3024"

    SYSFS{in5_max}="0"

    SYSFS{in5_min}="0"

    SYSFS{in6_input}="3024"

    SYSFS{in6_max}="0"

    SYSFS{in6_min}="0"

    SYSFS{name}="asb100"

    SYSFS{pwm1_enable}="1"

    SYSFS{pwm1}="240"

    SYSFS{temp1_input}="37000"

    SYSFS{temp1_max_hyst}="75000"

    SYSFS{temp1_max}="80000"

    SYSFS{temp2_input}="46500"

    SYSFS{temp2_max_hyst}="90000"

    SYSFS{temp2_max}="100000"

    SYSFS{temp3_input}="-500"

    SYSFS{temp3_max_hyst}="50000"

    SYSFS{temp3_max}="60000"

    SYSFS{temp4_input}="25000"

    SYSFS{temp4_max_hyst}="75000"

    SYSFS{temp4_max}="80000"

    SYSFS{vrm}="90"

and

'/etc/udev/rules.d/50-udev.rules'  has: 

# i2c devices

KERNEL="i2c-[0-9]*",    NAME="i2c/%n", SYMLINK="%k"

I tried my own rule

BUS="i2c" SYSFS{name}="asb100" KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"

and

SYSFS{name}="asb100" KERNEL="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"

but still no /dev/i2c

I've got the following modules modprobed in (I did a 'udevstart' after puting them in):

asb100                 22548  0

i2c_sensor           3712  1 asb100

i2c_i801               9868  0

i2c_algo_bit         8840  0

i2c_core               21136  4 asb100,i2c_sensor,i2c_i801,i2c_algo_bit

I'm running

2.6.11-gentoo-r6

hotplug-20040923

udev-056

.

.

----------

## wnelson

You may need to include i2c-isa? Man I totally miss understood you question. I see that you have sensors working!!!. What version of gkrellm are you using? every thing regarding sys is found in the sys/bus/i2c directory.

----------

## mjbjr

 *wnelson wrote:*   

> You may need to include i2c-isa? Man I totally miss understood you question. I see that you have sensors working!!!. What version of gkrellm are you using? every thing regarding sys is found in the sys/bus/i2c directory.

 

Yes, possibly, I do need i2c-isa, not that I can see why.  I'm not sure I even have isa on this system... nothing but pci and agp slots.

I'm going to have to read the i2c/lm_sensors docs more thoroughly, but they seem very complex/convoluted.

I'm using version 2.2.5 of gkrellm(2).

In gkrellm, beware that you may see a builtin for 'Sensors', but no data even though you have sensors working.

I needed to go down farther in the 'builtins', not sure where, and look/change(?) some minor config

(that had nothing to do with the sensors) to "wake gkrellm up" in regards to the sensors. Then go back to sensors

and it's all there.  Go figure.

While the sensors are working and I can see them, I believe udev should be producing an i2c device of some sort.

There are utilities, now, and probably more in the future, that expect and need an i2c device.

Just lookin' to cross the 'T's and dot the 'I's.

.

.

----------

## wnelson

 *Quote:*   

> I believe udev should be producing an i2c device of some sort.
> 
> There are utilities, now, and probably more in the future, that expect and need an i2c device. 

 

Everything that is i2c is in /sys/bus/i2c there is nothing created in /dev

----------

