of: Output devicetree alias names in uevent
authorStepan Moskovchenko <stepanm@codeaurora.org>
Thu, 6 Dec 2012 22:55:41 +0000 (14:55 -0800)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 6 Feb 2013 11:06:35 +0000 (11:06 +0000)
commitced4eec900850627409d7ff566b009471162b56b
treeeaa6551cbc421108d049e65855cdf618baa02117
parent88b62b915b0b7e25870eb0604ed9a92ba4bfc9f7
of: Output devicetree alias names in uevent

In some situations, userspace may want to resolve a
device by function and logical number (ie, "serial0")
rather than by the base address or full device path. Being
able to resolve a device by alias frees userspace from the
burden of otherwise having to maintain a mapping between
device addresses and their logical assignments on each
platform when multiple instances of the same hardware block
are present in the system.

Although the uevent device attribute contains devicetree
compatible information and the full device path, the uevent
does not list the alises that may have been defined for the
device.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
[grant.likely: Removed OF_ALIAS_N field; I don't think it's needed]
[grant.likely: Added #ifndef _LINUX_OF_PRIVATE_H wrapper]
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/of/base.c
drivers/of/device.c
drivers/of/of_private.h [new file with mode: 0644]