at24 eeprom bind doesn't stimulate udev

From: Jean-Francois Dagenais
Date: Wed Jul 31 2013 - 15:39:25 EST


Hi all,

Here's a shot in the dark, since I don't know where to start digging

In a yocto (1.4, kernel 3.4.52), I designed a bunch of udev rules to set some
permissions for some sysfs attributes, namely /sys/class/gpio/*/value and
/sys/bus/i2c/devices/0-00xx/eeprom.

I match the sysfs attributes appearing using something like: ACTION=="add",
SUBSYSTEM=="i2c", KERNEL=="?-005[012]", WAIT_FOR="eeprom", RUN+="/bin/chmod 664
/sys%p/eeprom"

In this example driver "at24" is bound to 0-005x because of modalias
"i2c:24c128".

When I "udev monitor &" then "echo 0-0051 >
/sys/bus/i2c/devices/0-0051/driver/[un]bind", nothing is dumped from udev. I
tried invoking udevd in the console using --debug, same result.

I do see the result of the driver binding and unbinding from sysfs. A dmesg
trace also appears which comes from the at24's probe(), confirming the echo
command is actually doing something in the kernel. It's just udev doesn't seem
to pick anything up. If I [un]bind other i2c devices, I see many udev event fly
by.

Where should I start to find the cause?

Thanks in advance!--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/