<para>Match sysfs attribute values of the event device. Up to five
<option>ATTR</option> keys can be specified per rule. Trailing
whitespace in the attribute values is ignored, if the specified match
- value does not contain trailing whitespace itself.</para>
+ value does not contain trailing whitespace itself. Depending on the type
+ of operator, this key is also used to set the value of a sysfs attribute.
+ </para>
</listitem>
</varlistentry>
<term><option>ENV{<replaceable>key</replaceable>}</option></term>
<listitem>
<para>Match against the value of an environment variable. Up to five <option>ENV</option>
- keys can be specified per rule. This key can also be used to export a variable to
- the environment.</para>
+ keys can be specified per rule. Depending on the type of operator, this key is also used
+ to export a variable to the environment.</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>ATTR{<replaceable>key</replaceable>}</option></term>
+ <listitem>
+ <para>The value that should be written to a sysfs attribute of the
+ event device. Depending on the type of operator, this key is also
+ used to match against the value of a sysfs attribute.</para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><option>ENV{<replaceable>key</replaceable>}</option></term>
<listitem>
- <para>Export a variable to the environment. This key can also be used to match
- against an environment variable.</para>
+ <para>Export a variable to the environment. Depending on the type of operator,
+ this key is also to match against an environment variable.</para>
</listitem>
</varlistentry>
<term><option>$id</option>, <option>%b</option></term>
<listitem>
<para>The name of the device matched while searching the devpath upwards for
- <option>SUBSYSTEMS</option>, <option>KERNELS</option> <option>DRIVERS</option> and <option>ATTRS</option>.
+ <option>SUBSYSTEMS</option>, <option>KERNELS</option>, <option>DRIVERS</option> and <option>ATTRS</option>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>$attr{<replaceable>file</replaceable>}</option>, <option>%s{<replaceable>file</replaceable>}</option></term>
<listitem>
- <para>The value of a sysfs attribute found at the current or a parent device.</para>
+ <para>The value of a sysfs attribute found at the device, where
+ all keys of the rule have matched. If the matching device does not have
+ such an attribute, all devices along the chain of parents are searched
+ for a matching attribute.
+ If the attribute is a symlink, the last element of the symlink target is
+ returned as the value.</para>
</listitem>
</varlistentry>