162306a36Sopenharmony_ciWhat:           /sys/.../uevent
262306a36Sopenharmony_ciDate:           May 2017
362306a36Sopenharmony_ciKernelVersion:  4.13
462306a36Sopenharmony_ciContact:        Linux kernel mailing list <linux-kernel@vger.kernel.org>
562306a36Sopenharmony_ciDescription:
662306a36Sopenharmony_ci                Enable passing additional variables for synthetic uevents that
762306a36Sopenharmony_ci                are generated by writing /sys/.../uevent file.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci                Recognized extended format is::
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci			ACTION [UUID [KEY=VALUE ...]
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci                The ACTION is compulsory - it is the name of the uevent
1462306a36Sopenharmony_ci                action (``add``, ``change``, ``remove``). There is no change
1562306a36Sopenharmony_ci                compared to previous functionality here. The rest of the
1662306a36Sopenharmony_ci                extended format is optional.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci                You need to pass UUID first before any KEY=VALUE pairs.
1962306a36Sopenharmony_ci                The UUID must be in ``xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx``
2062306a36Sopenharmony_ci                format where 'x' is a hex digit. The UUID is considered to be
2162306a36Sopenharmony_ci                a transaction identifier so it's possible to use the same UUID
2262306a36Sopenharmony_ci                value for one or more synthetic uevents in which case we
2362306a36Sopenharmony_ci                logically group these uevents together for any userspace
2462306a36Sopenharmony_ci                listeners. The UUID value appears in uevent as
2562306a36Sopenharmony_ci                ``SYNTH_UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`` environment
2662306a36Sopenharmony_ci                variable.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci                If UUID is not passed in, the generated synthetic uevent gains
2962306a36Sopenharmony_ci                ``SYNTH_UUID=0`` environment variable automatically.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci                The KEY=VALUE pairs can contain alphanumeric characters only.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci                It's possible to define zero or more pairs - each pair is then
3462306a36Sopenharmony_ci                delimited by a space character ' '. Each pair appears in
3562306a36Sopenharmony_ci                synthetic uevent as ``SYNTH_ARG_KEY=VALUE``. That means the KEY
3662306a36Sopenharmony_ci                name gains ``SYNTH_ARG_`` prefix to avoid possible collisions
3762306a36Sopenharmony_ci                with existing variables.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci                Example of valid sequence written to the uevent file::
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci                    add fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed A=1 B=abc
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci                This generates synthetic uevent including these variables::
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci                    ACTION=add
4662306a36Sopenharmony_ci                    SYNTH_ARG_A=1
4762306a36Sopenharmony_ci                    SYNTH_ARG_B=abc
4862306a36Sopenharmony_ci                    SYNTH_UUID=fe4d7c9d-b8c6-4a70-9ef1-3d8a58d18eed
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciUsers:
5162306a36Sopenharmony_ci                udev, userspace tools generating synthetic uevents
52