<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/of/device.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/of/device.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/of/device.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-06T11:06:35Z</updated>
<entry>
<title>of: Output devicetree alias names in uevent</title>
<updated>2013-02-06T11:06:35Z</updated>
<author>
<name>Stepan Moskovchenko</name>
<email>stepanm@codeaurora.org</email>
</author>
<published>2012-12-06T22:55:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ced4eec900850627409d7ff566b009471162b56b'/>
<id>urn:sha1:ced4eec900850627409d7ff566b009471162b56b</id>
<content type='text'>
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 &lt;stepanm@codeaurora.org&gt;
[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 &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>drivercore: Output common devicetree information in uevent</title>
<updated>2012-02-01T21:26:30Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2012-02-01T18:22:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=07d57a32fb6eb2da017796e038682f817a4f685e'/>
<id>urn:sha1:07d57a32fb6eb2da017796e038682f817a4f685e</id>
<content type='text'>
When userspace needs to find a specific device, it currently isn't easy to
resolve a /sys/devices/ path from a specific device tree node.  Nor is it
easy to obtain the compatible list for devices.

This patch generalizes the code that inserts OF_* values into the uevent
device attribute so that any device that is attached to an OF node will
have that information exported to userspace.  Without this patch only
platform devices and some powerpc-specific busses have access to this
data.

The original function also creates a MODALIAS property for the compatible
list, but that code has not been generalized into the common case because
it has the potential to break module loading on a lot of bus types.  Bus
types are still responsible for their own MODALIAS properties.

Boot tested on ARM and compile tested on PowerPC and SPARC.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Tobias Klauser &lt;tklauser@distanz.ch&gt;
Cc: Frederic Lambert &lt;frdrc66@gmail.com&gt;
Cc: Rob Herring &lt;rob.herring@calxeda.com&gt;
Cc: Mark Brown &lt;broonie@sirena.org.uk&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>dt/powerpc: move of_bus_type infrastructure to ibmebus</title>
<updated>2011-02-28T08:36:38Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2011-02-17T07:26:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=710ac54be44e0cc53f5bf29b03d12c8706e7077a'/>
<id>urn:sha1:710ac54be44e0cc53f5bf29b03d12c8706e7077a</id>
<content type='text'>
arch/powerpc/kernel/ibmebus.c is the only remaining user of the
of_bus_type support code for initializing the bus and registering
drivers.  All others have either been switched to the vanilla platform
bus or already have their own infrastructure.

This patch moves the functionality that ibmebus is using out of
drivers/of/{platform,device}.c and into ibmebus.c where it is actually
used.  Also renames the moved symbols from of_platform_* to
ibmebus_bus_* to reflect the actual usage.

This patch is part of moving all of the of_platform_bus_type users
over to the platform_bus_type.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
</content>
</entry>
<entry>
<title>of/device: Rework to use common platform_device_alloc() for allocating devices</title>
<updated>2010-10-21T17:10:10Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-10-20T17:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7096d0422153ffcc2264eef652fc3a7bca3e6d3c'/>
<id>urn:sha1:7096d0422153ffcc2264eef652fc3a7bca3e6d3c</id>
<content type='text'>
The current code allocates and manages platform_devices created from
the device tree manually.  It also uses an unsafe shortcut for
allocating the platform_device and the resource table at the same
time. (which I added in the last rework; sorry).

This patch refactors the code to use platform_device_alloc() for
allocating new devices.  This reduces the amount of custom code
implemented by of_platform, eliminates the unsafe alloc trick, and has
the side benefit of letting the platform_bus code manage freeing the
device data and resources when the device is freed.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Michal Simek &lt;monstr@monstr.eu&gt;
</content>
</entry>
<entry>
<title>of/device: Replace struct of_device with struct platform_device</title>
<updated>2010-08-06T15:25:50Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-08-06T15:25:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2dc11581376829303b98eadb2de253bee065a56a'/>
<id>urn:sha1:2dc11581376829303b98eadb2de253bee065a56a</id>
<content type='text'>
of_device is just an alias for platform_device, so remove it entirely.  Also
replace to_of_device() with to_platform_device() and update comment blocks.

This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.

@@
@@
-struct of_device
+struct platform_device

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Reviewed-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>of/device: Replace of_device with platform_device in includes and core code</title>
<updated>2010-07-24T15:58:21Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-07-22T19:59:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=94a0cb1fc61ab7a0d47d268a7764374efeb2160b'/>
<id>urn:sha1:94a0cb1fc61ab7a0d47d268a7764374efeb2160b</id>
<content type='text'>
of_device is currently just an #define alias to platform_device until it
gets removed entirely.  This patch removes references to it from the
include directories and the core drivers/of code.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>of: Merge of_platform_bus_type with platform_bus_type</title>
<updated>2010-07-24T15:57:51Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eca3930163ba8884060ce9d9ff5ef0d9b7c7b00f'/>
<id>urn:sha1:eca3930163ba8884060ce9d9ff5ef0d9b7c7b00f</id>
<content type='text'>
of_platform_bus was being used in the same manner as the platform_bus.
The only difference being that of_platform_bus devices are generated
from data in the device tree, and platform_bus devices are usually
statically allocated in platform code.  Having them separate causes
the problem of device drivers having to be registered twice if it
was possible for the same device to appear on either bus.

This patch removes of_platform_bus_type and registers all of_platform
bus devices and drivers on the platform bus instead.  A previous patch
made the of_device structure an alias for the platform_device structure,
and a shim is used to adapt of_platform_drivers to the platform bus.

After all of of_platform_bus drivers are converted to be normal platform
drivers, the shim code can be removed.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>of/device: Add OF style matching helper function</title>
<updated>2010-07-05T22:14:51Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8cec0e7b4c7c0b76f2b5285f250211ad81c3eafd'/>
<id>urn:sha1:8cec0e7b4c7c0b76f2b5285f250211ad81c3eafd</id>
<content type='text'>
Add of_driver_match_device() helper function.  This function can be used
by bus types to determine if a driver works with a device when using OF
style matching.  If CONFIG_OF is unselected, then it is a nop.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
CC: linux-kernel@vger.kernel.org
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
CC: devicetree-discuss@lists.ozlabs.org
</content>
</entry>
<entry>
<title>of: Modify of_device_get_modalias to be passed struct device</title>
<updated>2010-07-05T22:14:28Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=34a1c1e8c700f7cd849deb21193718a172722f8d'/>
<id>urn:sha1:34a1c1e8c700f7cd849deb21193718a172722f8d</id>
<content type='text'>
Now that the of_node pointer is part of struct device,
of_device_get_modalias could be used on any struct device
that has the device node pointer set.  This patch changes
of_device_get_modalias to accept a struct device instead
of a struct of_device.

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org
</content>
</entry>
<entry>
<title>of/device: merge of_device_uevent</title>
<updated>2010-07-05T22:14:28Z</updated>
<author>
<name>Grant Likely</name>
<email>grant.likely@secretlab.ca</email>
</author>
<published>2010-06-08T13:48:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd27dcda37f0b1a3b674760fb411abc5c8fe309c'/>
<id>urn:sha1:dd27dcda37f0b1a3b674760fb411abc5c8fe309c</id>
<content type='text'>
Merge common code between powerpc and microblaze

Signed-off-by: Grant Likely &lt;grant.likely@secretlab.ca&gt;
CC: Michal Simek &lt;monstr@monstr.eu&gt;
CC: Wolfram Sang &lt;w.sang@pengutronix.de&gt;
CC: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
CC: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
CC: microblaze-uclinux@itee.uq.edu.au
CC: linuxppc-dev@ozlabs.org

</content>
</entry>
</feed>
