Hi Martin,
On 03/03/11 09:54, Martin Pitt wrote:
Hello Thomas,
funny that you ask, a few days ago someone asked exactly the same
thing in #udev.
that was me:)
Thomas Bechtold [2011-03-03 7:21 +0100]:
### only check /dev/ttyS1 (atmel_usart.1) for modem ###
ACTION!="add|change", GOTO="mm_platform_device_whitelist_end"
SUBSYSTEM!="platform", GOTO="mm_platform_device_whitelist_end"
DRIVERS=="atmel_usart",KERNELS=="atmel_usart.1",ENV{ID_MM_PLATFORM_DRIVER_PROBE}="1"
LABEL="mm_platform_device_whitelist_end"
I'm afraid udevadm trigger doesn't support the same parental matching
as udev rules themselves do, so I don't think there can be a precise
trigger unless you already know the corresponding /dev/ttySn device
node. If you do, then just do
udevadm trigger --sysname-match=ttySn
i know the device name. it's always ttyS1. But your trigger does not
match the rule:
# udevadm trigger --sysname-match=ttyS1 --verbose
/sys/devices/platform/atmel_usart.1/tty/ttyS1
I tried to do this with udevadm (modemmanager is running in background
and log is written to sdtout):
# udevadm trigger --action=add --subsystem-match=tty
--subsystem-match=platform --sysname-match=ttyS1 --verbose
/sys/devices/platform/atmel_usart.1/tty/ttyS1
Here, ModemManager does nothing.
When i execute the command with ttyS0, the output is:
# udevadm trigger --action=add --subsystem-match=tty
--subsystem-match=platform --sysname-match=ttyS0 --verbose
/sys/devices/platform/atmel_usart.1/tty/ttyS0
modem-manager[772]: <debug> [1299145393.216952] [mm-manager.c:802]
device_added(): (tty/ttyS0): port's parent platform driver is not
whitelisted
Here, ModemManager detects the trigger.
I think the question is how to set DRIVERS="atmel_usart" and
KERNELS=="atmel_usart.1" !?
Cheers,
Tom
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html